[Mesa-dev] [PATCH] ac: fix nir_op_fdd{x,y} handling
Dave Airlie
airlied at gmail.com
Tue Feb 27 06:23:44 UTC 2018
Reviewed-by: Dave Airlie <airlied at redhat.com>
Though I suspect the test should handle getting either.
Dave.
On 27 February 2018 at 15:49, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> 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
> ---
> 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 0e38b0b370..c25ae121e2 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;
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list