[Mesa-dev] [PATCH 1/2] gallivm: fix rho calculation for 1d case

sroland at vmware.com sroland at vmware.com
Wed Aug 21 08:08:35 PDT 2013


From: Roland Scheidegger <sroland at vmware.com>

Was using wrong (undefined) vector element (the elements are at 0/2 position,
not 0/1).
---
 src/gallium/auxiliary/gallivm/lp_bld_sample.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 8c5189d..d339aba 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -395,7 +395,7 @@ lp_build_rho(struct lp_build_sample_context *bld,
 
          if (dims < 2) {
             rho_xvec = lp_build_swizzle_aos(coord_bld, ddx_ddy[0], swizzle0);
-            rho_yvec = lp_build_swizzle_aos(coord_bld, ddx_ddy[0], swizzle1);
+            rho_yvec = lp_build_swizzle_aos(coord_bld, ddx_ddy[0], swizzle2);
          }
          else if (dims == 2) {
             static const unsigned char swizzle02[] = {
-- 
1.7.9.5


More information about the mesa-dev mailing list