mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
radeonsi: stop using si_shader_info::output_semantic for passthrough TCS
This will allow removing output_semantic. Acked-by: Pierre-Eric Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40556>
This commit is contained in:
parent
debedefbeb
commit
ef229b8c3e
3 changed files with 11 additions and 4 deletions
|
|
@ -518,6 +518,8 @@ void si_nir_gather_info(struct si_screen *sscreen, struct nir_shader *nir,
|
|||
info->base.num_ubos = nir->info.num_ubos;
|
||||
info->base.num_ssbos = nir->info.num_ssbos;
|
||||
info->base.num_images = nir->info.num_images;
|
||||
info->base.outputs_written = nir->info.outputs_written;
|
||||
info->base.outputs_written_16bit = nir->info.outputs_written_16bit;
|
||||
info->base.textures_used = nir->info.textures_used[0];
|
||||
|
||||
info->base.task_payload_size = nir->info.task_payload_size;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ struct si_shader_info {
|
|||
uint8_t num_images;
|
||||
uint32_t textures_used;
|
||||
|
||||
uint64_t outputs_written;
|
||||
uint16_t outputs_written_16bit;
|
||||
|
||||
unsigned task_payload_size;
|
||||
uint16_t workgroup_size[3];
|
||||
bool workgroup_size_variable:1;
|
||||
|
|
|
|||
|
|
@ -171,14 +171,16 @@ void *si_create_clear_buffer_rmw_cs(struct si_context *sctx)
|
|||
void *si_create_passthrough_tcs(struct si_context *sctx)
|
||||
{
|
||||
unsigned locations[PIPE_MAX_SHADER_OUTPUTS];
|
||||
|
||||
unsigned num_outputs = 0;
|
||||
struct si_shader_info *info = &sctx->shader.vs.cso->info;
|
||||
for (unsigned i = 0; i < info->num_outputs; i++) {
|
||||
locations[i] = info->output_semantic[i];
|
||||
|
||||
u_foreach_bit64_two_masks(slot, info->base.outputs_written,
|
||||
VARYING_SLOT_VAR0_16BIT, info->base.outputs_written_16bit) {
|
||||
locations[num_outputs++] = slot;
|
||||
}
|
||||
|
||||
nir_shader *tcs = nir_create_passthrough_tcs_impl(sctx->screen->nir_options, locations,
|
||||
info->num_outputs, sctx->patch_vertices);
|
||||
num_outputs, sctx->patch_vertices);
|
||||
NIR_PASS(_, tcs, nir_lower_system_values);
|
||||
|
||||
return si_create_shader_state(sctx, tcs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue