aco/gfx12: disable vinterp ddx/ddy optimization
This only seems to work on gfx11 and gfx11.5, and it's only faster on gfx11.5.
We could continue to use vinterp, with constants copied to vgprs, but
whether that's beneficial depends on the shader.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12250
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32495>
This commit is contained in:
@@ -8387,8 +8387,12 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
|
||||
} else {
|
||||
aco_opcode subrev =
|
||||
instr->def.bit_size == 16 ? aco_opcode::v_subrev_f16 : aco_opcode::v_subrev_f32;
|
||||
|
||||
/* v_interp with constant sources only works on GFX11/11.5,
|
||||
* and it's only faster on GFX11.5.
|
||||
*/
|
||||
bool use_interp = dpp_ctrl1 == dpp_quad_perm(0, 0, 0, 0) && instr->def.bit_size == 32 &&
|
||||
ctx->program->gfx_level >= GFX11_5;
|
||||
ctx->program->gfx_level == GFX11_5;
|
||||
if (!nir_src_is_divergent(&instr->src[0])) {
|
||||
bld.vop2(subrev, Definition(dst), src, src);
|
||||
} else if (use_interp && dpp_ctrl2 == dpp_quad_perm(1, 1, 1, 1)) {
|
||||
|
||||
Reference in New Issue
Block a user