From: Marek Olšák Date: Fri, 13 Mar 2020 23:28:58 +0000 (-0400) Subject: radeonsi: split si_all_descriptors_begin_new_cs and rename functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=caeb44aa244082f3a304a00d5d4e32faf66fca70;p=mesa.git radeonsi: split si_all_descriptors_begin_new_cs and rename functions A future commit will extend it. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index ec3b0af3355..3e354d106b0 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -178,7 +178,8 @@ static bool si_upload_descriptors(struct si_context *sctx, struct si_descriptors return true; } -static void si_descriptors_begin_new_cs(struct si_context *sctx, struct si_descriptors *desc) +static void +si_add_descriptors_to_bo_list(struct si_context *sctx, struct si_descriptors *desc) { if (!desc->buffer) return; @@ -1929,7 +1930,7 @@ static void si_mark_shader_pointers_dirty(struct si_context *sctx, unsigned shad si_mark_atom_dirty(sctx, &sctx->atoms.s.shader_pointers); } -static void si_shader_pointers_begin_new_cs(struct si_context *sctx) +void si_shader_pointers_mark_dirty(struct si_context *sctx) { sctx->shader_pointers_dirty = u_bit_consecutive(0, SI_NUM_DESCS); sctx->vertex_buffer_pointer_dirty = sctx->vb_descriptors_buffer != NULL; @@ -2804,13 +2805,11 @@ void si_compute_resources_add_all_to_bo_list(struct si_context *sctx) sctx->bo_list_add_all_compute_resources = false; } -void si_all_descriptors_begin_new_cs(struct si_context *sctx) +void si_add_all_descriptors_to_bo_list(struct si_context *sctx) { for (unsigned i = 0; i < SI_NUM_DESCS; ++i) - si_descriptors_begin_new_cs(sctx, &sctx->descriptors[i]); - si_descriptors_begin_new_cs(sctx, &sctx->bindless_descriptors); - - si_shader_pointers_begin_new_cs(sctx); + si_add_descriptors_to_bo_list(sctx, &sctx->descriptors[i]); + si_add_descriptors_to_bo_list(sctx, &sctx->bindless_descriptors); sctx->bo_list_add_all_resident_resources = true; sctx->bo_list_add_all_gfx_resources = true; diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c index aee937203af..64b216bf880 100644 --- a/src/gallium/drivers/radeonsi/si_gfx_cs.c +++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c @@ -390,7 +390,8 @@ void si_begin_new_gfx_cs(struct si_context *ctx) SI_CONTEXT_INV_L2 | SI_CONTEXT_START_PIPELINE_STATS; ctx->cs_shader_state.initialized = false; - si_all_descriptors_begin_new_cs(ctx); + si_add_all_descriptors_to_bo_list(ctx); + si_shader_pointers_mark_dirty(ctx); if (!ctx->has_graphics) { ctx->initial_gfx_cs_size = ctx->gfx_cs->current.cdw; diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 46761a51c1c..f7e78d2187b 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -503,7 +503,8 @@ void si_gfx_resources_add_all_to_bo_list(struct si_context *sctx); void si_compute_resources_add_all_to_bo_list(struct si_context *sctx); bool si_gfx_resources_check_encrypted(struct si_context *sctx); bool si_compute_resources_check_encrypted(struct si_context *sctx); -void si_all_descriptors_begin_new_cs(struct si_context *sctx); +void si_shader_pointers_mark_dirty(struct si_context *sctx); +void si_add_all_descriptors_to_bo_list(struct si_context *sctx); void si_upload_const_buffer(struct si_context *sctx, struct si_resource **buf, const uint8_t *ptr, unsigned size, uint32_t *const_offset); void si_update_all_texture_descriptors(struct si_context *sctx);