diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/spirv/vtn_alu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/nir/spirv/vtn_alu.c b/src/compiler/nir/spirv/vtn_alu.c index d866da7445e..450bc158be9 100644 --- a/src/compiler/nir/spirv/vtn_alu.c +++ b/src/compiler/nir/spirv/vtn_alu.c @@ -404,17 +404,17 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, case SpvOpFwidth: val->ssa->def = nir_fadd(&b->nb, nir_fabs(&b->nb, nir_fddx(&b->nb, src[0])), - nir_fabs(&b->nb, nir_fddx(&b->nb, src[1]))); + nir_fabs(&b->nb, nir_fddy(&b->nb, src[0]))); return; case SpvOpFwidthFine: val->ssa->def = nir_fadd(&b->nb, nir_fabs(&b->nb, nir_fddx_fine(&b->nb, src[0])), - nir_fabs(&b->nb, nir_fddx_fine(&b->nb, src[1]))); + nir_fabs(&b->nb, nir_fddy_fine(&b->nb, src[0]))); return; case SpvOpFwidthCoarse: val->ssa->def = nir_fadd(&b->nb, nir_fabs(&b->nb, nir_fddx_coarse(&b->nb, src[0])), - nir_fabs(&b->nb, nir_fddx_coarse(&b->nb, src[1]))); + nir_fabs(&b->nb, nir_fddy_coarse(&b->nb, src[0]))); return; case SpvOpVectorTimesScalar: |