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

Author: Roland Scheidegger <srol...@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 <jfons...@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);
          }
       }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to