aco: set late kill for v_interp_p1_f32 for some APUs
Apparently needed for Stoney Ridge, Kabini and Mullins APUs. gfx702 also has 16-bank LDS and https://llvm.org/docs/AMDGPUUsage.html lists some dGPUs under there. Those GPUs seem to be Hawaii actually (gfx701) and we don't seem to have gotten any interpolation related bugs reported with them so far. The late kill flag was tested by running pipeline-db with ACO_DEBUG=validatera while setting late kill for SMEM buffer loads, emit_vop2_instruction() and texture instructions. I also tested with just setting the flag for v_interp_p1_f32. As far as I know, the only other thing we have to consider for 16-bank LDS is something to do with 16-bit interpolation. We don't do that yet. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3914> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3914>
This commit is contained in:
parent
1872759f55
commit
ee9e0d1eca
|
@ -3463,8 +3463,10 @@ void emit_interp_instr(isel_context *ctx, unsigned idx, unsigned component, Temp
|
|||
Temp coord2 = emit_extract_vector(ctx, src, 1, v1);
|
||||
|
||||
Builder bld(ctx->program, ctx->block);
|
||||
Temp tmp = bld.vintrp(aco_opcode::v_interp_p1_f32, bld.def(v1), coord1, bld.m0(prim_mask), idx, component);
|
||||
bld.vintrp(aco_opcode::v_interp_p2_f32, Definition(dst), coord2, bld.m0(prim_mask), tmp, idx, component);
|
||||
Builder::Result interp_p1 = bld.vintrp(aco_opcode::v_interp_p1_f32, bld.def(v1), coord1, bld.m0(prim_mask), idx, component);
|
||||
if (ctx->program->has_16bank_lds)
|
||||
interp_p1.instr->operands[0].setLateKill(true);
|
||||
bld.vintrp(aco_opcode::v_interp_p2_f32, Definition(dst), coord2, bld.m0(prim_mask), interp_p1, idx, component);
|
||||
}
|
||||
|
||||
void emit_load_frag_coord(isel_context *ctx, Temp dst, unsigned num_components)
|
||||
|
|
|
@ -1099,6 +1099,9 @@ setup_isel_context(Program* program,
|
|||
|
||||
program->lds_alloc_granule = args->options->chip_class >= GFX7 ? 512 : 256;
|
||||
program->lds_limit = args->options->chip_class >= GFX7 ? 65536 : 32768;
|
||||
/* apparently gfx702 also has 16-bank LDS but I can't find a family for that */
|
||||
program->has_16bank_lds = args->options->family == CHIP_KABINI || args->options->family == CHIP_STONEY;
|
||||
|
||||
program->vgpr_limit = 256;
|
||||
program->vgpr_alloc_granule = 3;
|
||||
|
||||
|
|
|
@ -1197,6 +1197,7 @@ public:
|
|||
uint16_t min_waves = 0;
|
||||
uint16_t lds_alloc_granule;
|
||||
uint32_t lds_limit; /* in bytes */
|
||||
bool has_16bank_lds;
|
||||
uint16_t vgpr_limit;
|
||||
uint16_t sgpr_limit;
|
||||
uint16_t physical_sgprs;
|
||||
|
|
Loading…
Reference in New Issue