zink: add param to disable optimization when combining pipeline libraries
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
This commit is contained in:

committed by
Marge Bot

parent
203daf97c6
commit
dd9e5fea20
@@ -760,7 +760,7 @@ zink_create_gfx_pipeline_library(struct zink_screen *screen, struct zink_gfx_pro
|
||||
}
|
||||
|
||||
VkPipeline
|
||||
zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_program *prog, VkPipeline input, VkPipeline library, VkPipeline output)
|
||||
zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_program *prog, VkPipeline input, VkPipeline library, VkPipeline output, bool optimized)
|
||||
{
|
||||
VkPipeline libraries[] = {input, library, output};
|
||||
VkPipelineLibraryCreateInfoKHR libstate = {0};
|
||||
@@ -770,6 +770,10 @@ zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_pr
|
||||
|
||||
VkGraphicsPipelineCreateInfo pci = {0};
|
||||
pci.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
|
||||
if (optimized)
|
||||
pci.flags = VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT;
|
||||
else
|
||||
pci.flags = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT;
|
||||
pci.pNext = &libstate;
|
||||
|
||||
VkPipeline pipeline;
|
||||
|
@@ -52,7 +52,7 @@ zink_create_gfx_pipeline_library(struct zink_screen *screen, struct zink_gfx_pro
|
||||
VkPipeline
|
||||
zink_create_gfx_pipeline_output(struct zink_screen *screen, struct zink_gfx_pipeline_state *state);
|
||||
VkPipeline
|
||||
zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_program *prog, VkPipeline input, VkPipeline library, VkPipeline output);
|
||||
zink_create_gfx_pipeline_combined(struct zink_screen *screen, struct zink_gfx_program *prog, VkPipeline input, VkPipeline library, VkPipeline output, bool optimized);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -245,7 +245,7 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
||||
pc_entry->ikey = ikey;
|
||||
pc_entry->gkey = gkey;
|
||||
pc_entry->okey = okey;
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, gkey->pipeline, okey->pipeline);
|
||||
pipeline = zink_create_gfx_pipeline_combined(screen, prog, ikey->pipeline, gkey->pipeline, okey->pipeline, true);
|
||||
} else {
|
||||
pipeline = zink_create_gfx_pipeline(screen, prog, state, ctx->element_state->binding_map, vkmode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user