mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
radv: cache the slab bo pointer in the pipeline.
Otherwise each emission has to pointer chase across cachelines. Reduces overhead seen with zink on pixmark volplosion test. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
This commit is contained in:
parent
87f4252a51
commit
b20bd9e0df
4 changed files with 5 additions and 1 deletions
|
|
@ -1405,7 +1405,7 @@ radv_emit_graphics_pipeline(struct radv_cmd_buffer *cmd_buffer)
|
|||
|
||||
radv_emit_batch_break_on_new_ps(cmd_buffer);
|
||||
|
||||
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, pipeline->slab->alloc->arena->bo);
|
||||
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, pipeline->slab_bo);
|
||||
|
||||
if (unlikely(cmd_buffer->device->trace_bo))
|
||||
radv_save_pipeline(cmd_buffer, pipeline);
|
||||
|
|
|
|||
|
|
@ -3810,6 +3810,8 @@ radv_upload_shaders(struct radv_device *device, struct radv_pipeline *pipeline,
|
|||
if (!pipeline->slab)
|
||||
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
|
||||
pipeline->slab_bo = pipeline->slab->alloc->arena->bo;
|
||||
|
||||
/* Upload shader binaries. */
|
||||
uint64_t slab_va = radv_buffer_get_va(pipeline->slab->alloc->arena->bo);
|
||||
uint32_t slab_offset = pipeline->slab->alloc->offset;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ radv_create_shaders_from_pipeline_cache(
|
|||
entry->slab = pipeline->slab;
|
||||
} else {
|
||||
pipeline->slab = entry->slab;
|
||||
pipeline->slab_bo = pipeline->slab->alloc->arena->bo;
|
||||
}
|
||||
|
||||
if (num_stack_sizes) {
|
||||
|
|
|
|||
|
|
@ -1881,6 +1881,7 @@ struct radv_pipeline {
|
|||
struct radv_dynamic_state dynamic_state;
|
||||
|
||||
struct radv_pipeline_slab *slab;
|
||||
struct radeon_winsys_bo *slab_bo;
|
||||
|
||||
bool need_indirect_descriptor_sets;
|
||||
struct radv_shader *shaders[MESA_VULKAN_SHADER_STAGES];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue