mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
zink: add pushconst only pipeline layout
Now that all gfx pipelines share the same push constant layout, create a screen wide push const only layout that is compatible with all future programs. This layout will be used to update push constant values, so that the update can happen at any point before draw call. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
This commit is contained in:
parent
a0c6286485
commit
fd89690795
3 changed files with 8 additions and 1 deletions
|
|
@ -807,7 +807,7 @@ zink_pipeline_layout_create(struct zink_screen *screen, VkDescriptorSetLayout *d
|
|||
pcr[1].size = sizeof(float) * 6;
|
||||
plci.pushConstantRangeCount = 2;
|
||||
}
|
||||
plci.pPushConstantRanges = &pcr[0];
|
||||
plci.pPushConstantRanges = pcr;
|
||||
|
||||
VkPipelineLayout layout;
|
||||
VkResult result = VKSCR(CreatePipelineLayout)(screen->dev, &plci, NULL, &layout);
|
||||
|
|
|
|||
|
|
@ -1338,6 +1338,8 @@ zink_destroy_screen(struct pipe_screen *pscreen)
|
|||
|
||||
util_vertex_state_cache_deinit(&screen->vertex_state_cache);
|
||||
|
||||
VKSCR(DestroyPipelineLayout)(screen->dev, screen->gfx_push_constant_layout, NULL);
|
||||
|
||||
u_transfer_helper_destroy(pscreen->transfer_helper);
|
||||
util_queue_finish(&screen->cache_get_thread);
|
||||
util_queue_destroy(&screen->cache_get_thread);
|
||||
|
|
@ -2604,6 +2606,10 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
|||
screen->buffer_barrier = zink_resource_buffer_barrier;
|
||||
}
|
||||
|
||||
screen->gfx_push_constant_layout = zink_pipeline_layout_create(screen, NULL, 0, false);
|
||||
if (screen->gfx_push_constant_layout == VK_NULL_HANDLE)
|
||||
goto fail;
|
||||
|
||||
if (!zink_descriptor_layouts_init(screen))
|
||||
goto fail;
|
||||
|
||||
|
|
|
|||
|
|
@ -1273,6 +1273,7 @@ struct zink_screen {
|
|||
struct zink_modifier_prop modifier_props[PIPE_FORMAT_COUNT];
|
||||
|
||||
VkExtent2D maxSampleLocationGridSize[5];
|
||||
VkPipelineLayout gfx_push_constant_layout;
|
||||
|
||||
struct {
|
||||
bool broken_l4a4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue