Mesa (master): gallivm: Fix calculating rho for 3d textures for the single-quad case

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Jun 8 16:47:16 UTC 2012


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

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Thu May 24 21:05:13 2012 +0200

gallivm: Fix calculating rho for 3d textures for the single-quad case

Discovered by accident, this looks like a very old typo bug.

Signed-off-by: José Fonseca <jfonseca at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_sample.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 2ffd9b8..d966788 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -256,9 +256,8 @@ lp_build_rho(struct lp_build_sample_context *bld,
          rho_t = LLVMBuildExtractElement(builder, rho_vec, index1, "");
 
          rho = lp_build_max(float_bld, rho_s, rho_t);
-
          if (dims >= 3) {
-            rho_r = LLVMBuildExtractElement(builder, rho_vec, index0, "");
+            rho_r = LLVMBuildExtractElement(builder, rho_vec, index2, "");
             rho = lp_build_max(float_bld, rho, rho_r);
          }
       }




More information about the mesa-commit mailing list