diff options
author | Dave Airlie <[email protected]> | 2017-03-19 13:39:29 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-04-04 05:39:10 +1000 |
commit | 1e9e747d001dc6d61f11487090408a570c9ceddf (patch) | |
tree | abda5705b2deaca2d1f271e6dfe2f46012c367f1 /src/amd/common/ac_nir_to_llvm.c | |
parent | 303d22f319dadfaeba3cb49da8fc52eaa22ce2cd (diff) |
radv/ac: fix texture derivative ordering
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.).
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_nir_to_llvm.c')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 4 |
1 files 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 7ac9a1a3167..c8ea0da7740 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4230,8 +4230,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)); } } |