From dfbb18bdb58fa04ddd4cbd495299a704599ee09e Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 24 May 2012 21:05:13 +0200 Subject: [PATCH] gallivm: Fix calculating rho for 3d textures for the single-quad case MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Discovered by accident, this looks like a very old typo bug. Signed-off-by: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_sample.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index 2ffd9b8bfc3..d966788d74e 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); } } -- 2.30.2