Kenneth Graunke <kenn...@whitecape.org> writes: > On 09/22/2012 02:04 PM, Eric Anholt wrote: >> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> index da09538..5bd7238 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp >> @@ -1159,32 +1159,19 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg >> dst, fs_reg coordinate, >> return inst; >> } >> >> -/** >> - * Emit code to produce the coordinates for a texture lookup. >> - * >> - * Returns the fs_reg containing the texture coordinate (as opposed to >> - * setting this->result). >> - */ >> fs_reg >> -fs_visitor::emit_texcoord(ir_texture *ir, int sampler, int texunit) >> +fs_visitor::rescale_texcoord(ir_texture *ir, fs_reg coordinate, >> + bool is_rect, int sampler, int texunit) >> { > > Do you actually want to pass an ir_texture* here? All you actually need > is to pass ir->coordinate->type, which might be a little cleaner for > your new code. Not sure.
I needed an ir_texture * in the new code anyway because emit_texture_* wanted ir->op, ir->coordinate->type, ir->lod_info.*->type, and ir->type. > The rectangle/GL_CLAMP coordinate adjustment was the entire reason I > refactored this code into emit_texcoord(), and I feel like > emit_texcoord() is rather pointless after your change. Can we just fold > it back into visit()? Sounds good.
pgpzyRVPSJeKY.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev