radv: add VkGraphicsPipelineLibraryFlag to the graphics pipeline key

This is to generate a different key for a library created with
FRAGMENT_SHADER_BIT and no FS (ie. it would generate a noop FS) and
a library created with FRAGMENT_OUTPUT_INTERFACE with no CB attachments.

Otherwise, the same key would be generated and this would corrupt
the cache.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22264>
This commit is contained in:
Samuel Pitoiset
2023-03-31 16:30:09 +02:00
committed by Marge Bot
parent 47c0820dc7
commit 5e62d8d1bd
2 changed files with 3 additions and 0 deletions

View File

@@ -2082,6 +2082,7 @@ radv_generate_graphics_pipeline_key(const struct radv_device *device,
const struct radv_physical_device *pdevice = device->physical_device;
struct radv_pipeline_key key = radv_generate_pipeline_key(device, &pipeline->base, pCreateInfo->flags);
key.lib_flags = lib_flags;
key.has_multiview_view_index = state->rp ? !!state->rp->view_mask : 0;
if (pipeline->dynamic_states & RADV_DYNAMIC_VERTEX_INPUT) {

View File

@@ -65,6 +65,8 @@ struct radv_ps_epilog_key {
};
struct radv_pipeline_key {
uint32_t lib_flags : 4; /* VkGraphicsPipelineLibraryFlagBitsEXT */
uint32_t has_multiview_view_index : 1;
uint32_t optimisations_disabled : 1;
uint32_t invariant_geom : 1;