diff --git a/src/amd/vulkan/nir/radv_nir_lower_fs_barycentric.c b/src/amd/vulkan/nir/radv_nir_lower_fs_barycentric.c index 28f135245f4..8922c0bbcc6 100644 --- a/src/amd/vulkan/nir/radv_nir_lower_fs_barycentric.c +++ b/src/amd/vulkan/nir/radv_nir_lower_fs_barycentric.c @@ -22,11 +22,11 @@ lower_interp_center_smooth(nir_builder *b, nir_def *offset) nir_def *pull_model = nir_load_barycentric_model(b, 32); nir_def *deriv_x = - nir_vec3(b, nir_fddx_fine(b, nir_channel(b, pull_model, 0)), nir_fddx_fine(b, nir_channel(b, pull_model, 1)), - nir_fddx_fine(b, nir_channel(b, pull_model, 2))); + nir_vec3(b, nir_ddx_fine(b, nir_channel(b, pull_model, 0)), nir_ddx_fine(b, nir_channel(b, pull_model, 1)), + nir_ddx_fine(b, nir_channel(b, pull_model, 2))); nir_def *deriv_y = - nir_vec3(b, nir_fddy_fine(b, nir_channel(b, pull_model, 0)), nir_fddy_fine(b, nir_channel(b, pull_model, 1)), - nir_fddy_fine(b, nir_channel(b, pull_model, 2))); + nir_vec3(b, nir_ddy_fine(b, nir_channel(b, pull_model, 0)), nir_ddy_fine(b, nir_channel(b, pull_model, 1)), + nir_ddy_fine(b, nir_channel(b, pull_model, 2))); nir_def *offset_x = nir_channel(b, offset, 0); nir_def *offset_y = nir_channel(b, offset, 1); diff --git a/src/amd/vulkan/nir/radv_nir_lower_fs_intrinsics.c b/src/amd/vulkan/nir/radv_nir_lower_fs_intrinsics.c index 30f3d18e65a..1b1027b9abd 100644 --- a/src/amd/vulkan/nir/radv_nir_lower_fs_intrinsics.c +++ b/src/amd/vulkan/nir/radv_nir_lower_fs_intrinsics.c @@ -63,7 +63,7 @@ radv_nir_lower_fs_intrinsics(nir_shader *nir, const struct radv_shader_stage *fs nir_def *frag_z = nir_channel(&b, &intrin->def, 2); /* adjusted_frag_z = fddx_fine(frag_z) * 0.0625 + frag_z */ - nir_def *adjusted_frag_z = nir_fddx_fine(&b, frag_z); + nir_def *adjusted_frag_z = nir_ddx_fine(&b, frag_z); adjusted_frag_z = nir_ffma_imm1(&b, adjusted_frag_z, 0.0625f, frag_z); /* VRS Rate X = Ancillary[2:3] */ diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index f37451ab039..6c7395aad8f 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -1964,12 +1964,12 @@ nir_visitor::visit(ir_expression *ir) case ir_unop_round_even: result = nir_fround_even(&b, srcs[0]); break; case ir_unop_sin: result = nir_fsin(&b, srcs[0]); break; case ir_unop_cos: result = nir_fcos(&b, srcs[0]); break; - case ir_unop_dFdx: result = nir_fddx(&b, srcs[0]); break; - case ir_unop_dFdy: result = nir_fddy(&b, srcs[0]); break; - case ir_unop_dFdx_fine: result = nir_fddx_fine(&b, srcs[0]); break; - case ir_unop_dFdy_fine: result = nir_fddy_fine(&b, srcs[0]); break; - case ir_unop_dFdx_coarse: result = nir_fddx_coarse(&b, srcs[0]); break; - case ir_unop_dFdy_coarse: result = nir_fddy_coarse(&b, srcs[0]); break; + case ir_unop_dFdx: result = nir_ddx(&b, srcs[0]); break; + case ir_unop_dFdy: result = nir_ddy(&b, srcs[0]); break; + case ir_unop_dFdx_fine: result = nir_ddx_fine(&b, srcs[0]); break; + case ir_unop_dFdy_fine: result = nir_ddy_fine(&b, srcs[0]); break; + case ir_unop_dFdx_coarse: result = nir_ddx_coarse(&b, srcs[0]); break; + case ir_unop_dFdy_coarse: result = nir_ddy_coarse(&b, srcs[0]); break; case ir_unop_pack_snorm_2x16: result = nir_pack_snorm_2x16(&b, srcs[0]); break; diff --git a/src/compiler/nir/nir_lower_point_smooth.c b/src/compiler/nir/nir_lower_point_smooth.c index 6e0db59772e..e6a64999d50 100644 --- a/src/compiler/nir/nir_lower_point_smooth.c +++ b/src/compiler/nir/nir_lower_point_smooth.c @@ -62,7 +62,7 @@ lower_point_smooth(nir_builder *b, nir_intrinsic_instr *intr, nir_def *coord = nir_load_point_coord_maybe_flipped(b); /* point_size = 1.0 / dFdx(gl_PointCoord.x); */ - nir_def *point_size = nir_frcp(b, nir_fddx(b, nir_channel(b, coord, 0))); + nir_def *point_size = nir_frcp(b, nir_ddx(b, nir_channel(b, coord, 0))); /* radius = point_size * 0.5 */ nir_def *radius = nir_fmul_imm(b, point_size, 0.5); diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index c1a18ccdaf5..d8d67833565 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -949,8 +949,8 @@ lower_tex_to_txd(nir_builder *b, nir_tex_instr *tex) /* don't take the derivative of the array index */ if (tex->is_array) coord = nir_channels(b, coord, nir_component_mask(coord->num_components - 1)); - nir_def *dfdx = nir_fddx(b, coord); - nir_def *dfdy = nir_fddy(b, coord); + nir_def *dfdx = nir_ddx(b, coord); + nir_def *dfdy = nir_ddy(b, coord); txd->src[tex->num_srcs] = nir_tex_src_for_ssa(nir_tex_src_ddx, dfdx); txd->src[tex->num_srcs + 1] = nir_tex_src_for_ssa(nir_tex_src_ddy, dfdy); @@ -1458,8 +1458,8 @@ nir_lower_lod_zero_width(nir_builder *b, nir_tex_instr *tex) nir_def *coord = nir_channel(b, tex->src[coord_index].src.ssa, i); /* Compute the sum of the absolute values of derivatives. */ - nir_def *dfdx = nir_fddx(b, coord); - nir_def *dfdy = nir_fddy(b, coord); + nir_def *dfdx = nir_ddx(b, coord); + nir_def *dfdy = nir_ddy(b, coord); nir_def *fwidth = nir_fadd(b, nir_fabs(b, dfdx), nir_fabs(b, dfdy)); /* Check if the sum is 0. */ diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c index 13e357952b7..41ae3325ef6 100644 --- a/src/compiler/spirv/vtn_alu.c +++ b/src/compiler/spirv/vtn_alu.c @@ -730,18 +730,18 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, case SpvOpFwidth: dest->def = nir_fadd(&b->nb, - nir_fabs(&b->nb, nir_fddx(&b->nb, src[0])), - nir_fabs(&b->nb, nir_fddy(&b->nb, src[0]))); + nir_fabs(&b->nb, nir_ddx(&b->nb, src[0])), + nir_fabs(&b->nb, nir_ddy(&b->nb, src[0]))); break; case SpvOpFwidthFine: dest->def = nir_fadd(&b->nb, - nir_fabs(&b->nb, nir_fddx_fine(&b->nb, src[0])), - nir_fabs(&b->nb, nir_fddy_fine(&b->nb, src[0]))); + nir_fabs(&b->nb, nir_ddx_fine(&b->nb, src[0])), + nir_fabs(&b->nb, nir_ddy_fine(&b->nb, src[0]))); break; case SpvOpFwidthCoarse: dest->def = nir_fadd(&b->nb, - nir_fabs(&b->nb, nir_fddx_coarse(&b->nb, src[0])), - nir_fabs(&b->nb, nir_fddy_coarse(&b->nb, src[0]))); + nir_fabs(&b->nb, nir_ddx_coarse(&b->nb, src[0])), + nir_fabs(&b->nb, nir_ddy_coarse(&b->nb, src[0]))); break; case SpvOpVectorTimesScalar: diff --git a/src/freedreno/ir3/ir3_nir_lower_load_barycentric_at_offset.c b/src/freedreno/ir3/ir3_nir_lower_load_barycentric_at_offset.c index 782f38be5c5..c2d36421224 100644 --- a/src/freedreno/ir3/ir3_nir_lower_load_barycentric_at_offset.c +++ b/src/freedreno/ir3/ir3_nir_lower_load_barycentric_at_offset.c @@ -51,8 +51,8 @@ ir3_nir_lower_load_barycentric_at_offset_instr(nir_builder *b, nir_instr *instr, * times the derivatives of ij in screen space. */ nir_def *new_ij = ij; - new_ij = nir_ffma(b, chan(off, 0), nir_fddx(b, ij), new_ij); - new_ij = nir_ffma(b, chan(off, 1), nir_fddy(b, ij), new_ij); + new_ij = nir_ffma(b, chan(off, 0), nir_ddx(b, ij), new_ij); + new_ij = nir_ffma(b, chan(off, 1), nir_ddy(b, ij), new_ij); return new_ij; } else { @@ -70,8 +70,8 @@ ir3_nir_lower_load_barycentric_at_offset_instr(nir_builder *b, nir_instr *instr, /* Get the offset value from pixel center for ij, and also for w. */ nir_def *pos = sij; - pos = nir_ffma(b, chan(off, 0), nir_fddx(b, sij), pos); - pos = nir_ffma(b, chan(off, 1), nir_fddy(b, sij), pos); + pos = nir_ffma(b, chan(off, 0), nir_ddx(b, sij), pos); + pos = nir_ffma(b, chan(off, 1), nir_ddy(b, sij), pos); /* convert back into screen space, dividing by the offset 1/w */ return nir_fmul(b, nir_trim_vector(b, pos, 2),