radeonsi: don't overwrite the scratch offset in shader prologs
Prologs only look at num_input_sgprs. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
@@ -5839,6 +5839,10 @@ int si_compile_tgsi_shader(struct si_screen *sscreen,
|
||||
|
||||
radeon_llvm_dispose(&ctx.radeon_bld);
|
||||
|
||||
/* Add the scratch offset to input SGPRs. */
|
||||
if (shader->config.scratch_bytes_per_wave)
|
||||
shader->info.num_input_sgprs += 1; /* scratch byte offset */
|
||||
|
||||
/* Calculate the number of fragment input VGPRs. */
|
||||
if (ctx.type == TGSI_PROCESSOR_FRAGMENT) {
|
||||
shader->info.num_input_vgprs = 0;
|
||||
@@ -6765,9 +6769,6 @@ static void si_fix_num_sgprs(struct si_shader *shader)
|
||||
{
|
||||
unsigned min_sgprs = shader->info.num_input_sgprs + 2; /* VCC */
|
||||
|
||||
if (shader->config.scratch_bytes_per_wave)
|
||||
min_sgprs += 1; /* scratch wave offset */
|
||||
|
||||
shader->config.num_sgprs = MAX2(shader->config.num_sgprs, min_sgprs);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user