[Mesa-dev] [PATCH 2/2] radv/ac: fix texture derivative ordering
Dave Airlie
airlied at gmail.com
Mon Apr 3 03:46:36 UTC 2017
From: Dave Airlie <airlied at redhat.com>
The ordering NIR gives us is correct for the hw, this fixes:
dEQP-VK.glsl.texture_functions.texturegrad.* (mainly trigged
on isampler/usampler 3d textures.).
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/common/ac_nir_to_llvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index adba539..75aacde 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4231,8 +4231,8 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
}
for (unsigned i = 0; i < num_deriv_comp; i++) {
- derivs[i * 2] = to_float(ctx, llvm_extract_elem(ctx, ddx, i));
- derivs[i * 2 + 1] = to_float(ctx, llvm_extract_elem(ctx, ddy, i));
+ derivs[i] = to_float(ctx, llvm_extract_elem(ctx, ddx, i));
+ derivs[num_deriv_comp + i] = to_float(ctx, llvm_extract_elem(ctx, ddy, i));
}
}
--
2.7.4
More information about the mesa-dev
mailing list