summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-27 16:08:40 +1100
committerTimothy Arceri <[email protected]>2018-02-28 09:23:49 +1100
commit9790921ff5c88ad860c55ba21ef1d66afd9ab2dc (patch)
treef1f52aa93837a7ce3abb973a7ce5e7559a5e20df /src
parent8de6f7970702ec69143c4e256bbeab64fe7d79c0 (diff)
ac: fix nir_op_fdd{x,y} handling
radeonsi, i965 and anv all treat fdd{x,y} opcodes the same as fdd{x,y}_coarse by default. The SPIR-V spec lets the implementation decide how it should be handled and radv was previously going for the higher quality option. Here we change the shared amd code to match how nir_op_fdd{x,y} is expected to be handled by the other NIR drivers. Fixes piglit test: ./bin/arb_shader_texture_lod-texgrad -auto Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
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 fabecb17869..b01012833fe 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1613,9 +1613,9 @@ static LLVMValueRef emit_ddxy(struct ac_nir_context *ctx,
int idx;
LLVMValueRef result;
- if (op == nir_op_fddx_fine || op == nir_op_fddx)
+ if (op == nir_op_fddx_fine)
mask = AC_TID_MASK_LEFT;
- else if (op == nir_op_fddy_fine || op == nir_op_fddy)
+ else if (op == nir_op_fddy_fine)
mask = AC_TID_MASK_TOP;
else
mask = AC_TID_MASK_TOP_LEFT;