From: Dave Airlie Date: Sat, 1 Sep 2012 03:55:38 +0000 (+1000) Subject: glsl_to_tgsi: fix dst register for texturing fetches. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9785ae0973cc206afc36dbc7d5b9553f92d06b47;p=mesa.git glsl_to_tgsi: fix dst register for texturing fetches. I've no idea why there isn't a piglit that triggers this behaviour, but while enabling TBOs for softpipe and r600g, I noticed all the integer tests failed. I tracked it back to the TXF returning a float when it should be returning an int. This fixed it and I haven't seen any regressions in a full piglit run on softpipe. http://bugs.freedesktop.org/55010 NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Dave Airlie --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index a70a08bf3b9..cd47adc0486 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2591,7 +2591,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) /* Storage for our result. Ideally for an assignment we'd be using * the actual storage for the result here, instead. */ - result_src = get_temp(glsl_type::vec4_type); + result_src = get_temp(ir->type); result_dst = st_dst_reg(result_src); switch (ir->op) {