radeonsi: add task/mesh shader context states

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38044>
This commit is contained in:
Qiang Yu
2025-06-06 16:40:03 +08:00
committed by Marge Bot
parent cffc40051d
commit e819554b2a
3 changed files with 21 additions and 0 deletions
+2
View File
@@ -677,6 +677,8 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs)
*/
ctx->force_shader_coherency.with_cb = true;
ctx->force_shader_coherency.with_db = true;
ctx->task_state_init_emitted = false;
}
void si_trace_emit(struct si_context *sctx)
+7
View File
@@ -391,6 +391,13 @@ static void si_destroy_context(struct pipe_context *context)
_mesa_hash_table_u64_destroy(sctx->ps_resolve_shaders);
}
si_resource_reference(&sctx->task_wait_buf, NULL);
si_resource_reference(&sctx->task_ring, NULL);
si_resource_reference(&sctx->task_scratch_buffer, NULL);
si_resource_reference(&sctx->mesh_scratch_ring, NULL);
if (sctx->task_preamble_state)
si_pm4_free_state(sctx, sctx->task_preamble_state, ~0);
FREE(sctx);
}
+12
View File
@@ -1362,6 +1362,18 @@ struct si_context {
struct si_ds_queue ds_queue;
uint32_t *last_timestamp_cmd;
unsigned int last_timestamp_cmd_cdw;
/* For mesh shader */
struct si_resource *task_wait_buf;
uint32_t task_wait_count;
uint32_t last_task_wait_count;
bool task_state_init_emitted;
struct si_resource *task_ring;
struct si_resource *task_scratch_buffer;
unsigned max_seen_task_scratch_bytes_per_wave;
uint32_t task_tmpring_size;
struct si_pm4_state *task_preamble_state;
struct si_resource *mesh_scratch_ring;
};
/* si_barrier.c */