Mesa (master): glsl_to_tgsi: fix dst register for texturing fetches.

Dave Airlie airlied at kemper.freedesktop.org
Thu Nov 8 20:07:28 UTC 2012


Module: Mesa
Branch: master
Commit: 9785ae0973cc206afc36dbc7d5b9553f92d06b47
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9785ae0973cc206afc36dbc7d5b9553f92d06b47

Author: Dave Airlie <airlied at gmail.com>
Date:   Sat Sep  1 13:55:38 2012 +1000

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 <airlied at redhat.com>

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index a70a08b..cd47adc 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) {




More information about the mesa-commit mailing list