mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 06:20:09 +01:00
aco: don't set private_segment_buffer/scratch_offset on GFX9+
It is unused. Also don't initialize scratch in raytracing stages as it gets initialized in the prolog shader. Co-authored-by: Friedrich Vock <friedrich.vock@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21780>
This commit is contained in:
parent
a33b9d43d8
commit
1f01a86b36
1 changed files with 12 additions and 12 deletions
|
|
@ -11149,20 +11149,20 @@ add_startpgm(struct isel_context* ctx)
|
|||
}
|
||||
}
|
||||
|
||||
/* Stash these in the program so that they can be accessed later when
|
||||
* handling spilling.
|
||||
*/
|
||||
ctx->program->private_segment_buffer = get_arg(ctx, ctx->args->ring_offsets);
|
||||
if (ctx->program->gfx_level <= GFX10_3) {
|
||||
if (ctx->program->gfx_level < GFX9) {
|
||||
/* Stash these in the program so that they can be accessed later when
|
||||
* handling spilling.
|
||||
*/
|
||||
ctx->program->private_segment_buffer = get_arg(ctx, ctx->args->ring_offsets);
|
||||
ctx->program->scratch_offset = get_arg(ctx, ctx->args->scratch_offset);
|
||||
|
||||
if (ctx->program->gfx_level >= GFX9) {
|
||||
Operand scratch_offset(ctx->program->scratch_offset);
|
||||
scratch_offset.setLateKill(true);
|
||||
Builder bld(ctx->program, ctx->block);
|
||||
bld.pseudo(aco_opcode::p_init_scratch, bld.def(s2), bld.def(s1, scc),
|
||||
ctx->program->private_segment_buffer, scratch_offset);
|
||||
}
|
||||
} else if (ctx->program->gfx_level <= GFX10_3 && ctx->program->stage != raytracing_cs) {
|
||||
/* Manually initialize scratch. For RT stages scratch initialization is done in the prolog. */
|
||||
Operand scratch_offset = Operand(get_arg(ctx, ctx->args->scratch_offset));
|
||||
scratch_offset.setLateKill(true);
|
||||
Builder bld(ctx->program, ctx->block);
|
||||
bld.pseudo(aco_opcode::p_init_scratch, bld.def(s2), bld.def(s1, scc),
|
||||
get_arg(ctx, ctx->args->ring_offsets), scratch_offset);
|
||||
}
|
||||
|
||||
return startpgm;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue