diff options
Diffstat (limited to 'src/amd/compiler/aco_instruction_selection_setup.cpp')
-rw-r--r-- | src/amd/compiler/aco_instruction_selection_setup.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index b65628c8521..3ab8ebb19eb 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -97,8 +97,6 @@ struct isel_context { /* scratch */ bool scratch_enabled = false; - Temp private_segment_buffer = Temp(0, s2); /* also the part of the scratch descriptor on compute */ - Temp scratch_offset = Temp(0, s1); /* inputs common for merged stages */ Temp merged_wave_info = Temp(0, s1); @@ -929,7 +927,7 @@ void add_startpgm(struct isel_context *ctx) /* this needs to be in sgprs 0 and 1 */ if (ctx->options->supports_spill || user_sgpr_info.need_ring_offsets || ctx->scratch_enabled) { - add_arg(&args, s2, &ctx->private_segment_buffer, 0); + add_arg(&args, s2, &ctx->program->private_segment_buffer, 0); set_loc_shader_ptr(ctx, AC_UD_SCRATCH_RING_OFFSETS, &user_sgpr_info.user_sgpr_idx); } @@ -961,8 +959,8 @@ void add_startpgm(struct isel_context *ctx) else declare_streamout_sgprs(ctx, &args, &idx); - if (ctx->scratch_enabled) - add_arg(&args, s1, &ctx->scratch_offset, idx++); + if (ctx->options->supports_spill || ctx->scratch_enabled) + add_arg(&args, s1, &ctx->program->scratch_offset, idx++); declare_vs_input_vgprs(ctx, &args); break; @@ -973,8 +971,8 @@ void add_startpgm(struct isel_context *ctx) assert(user_sgpr_info.user_sgpr_idx == user_sgpr_info.num_sgpr); add_arg(&args, s1, &ctx->prim_mask, user_sgpr_info.user_sgpr_idx); - if (ctx->scratch_enabled) - add_arg(&args, s1, &ctx->scratch_offset, user_sgpr_info.user_sgpr_idx + 1); + if (ctx->options->supports_spill || ctx->scratch_enabled) + add_arg(&args, s1, &ctx->program->scratch_offset, user_sgpr_info.user_sgpr_idx + 1); ctx->program->config->spi_ps_input_addr = 0; ctx->program->config->spi_ps_input_ena = 0; @@ -1039,8 +1037,8 @@ void add_startpgm(struct isel_context *ctx) if (ctx->program->info->cs.uses_local_invocation_idx) add_arg(&args, s1, &ctx->tg_size, idx++); - if (ctx->scratch_enabled) - add_arg(&args, s1, &ctx->scratch_offset, idx++); + if (ctx->options->supports_spill || ctx->scratch_enabled) + add_arg(&args, s1, &ctx->program->scratch_offset, idx++); add_arg(&args, v1, &ctx->local_invocation_ids[0], vgpr_idx++); add_arg(&args, v1, &ctx->local_invocation_ids[1], vgpr_idx++); |