lvp: Stash the PipelineCreateFlags2KHR in the pipeline

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
This commit is contained in:
Faith Ekstrand 2024-08-26 18:10:42 -05:00 committed by Marge Bot
parent c0191b20de
commit 4365d0d769
3 changed files with 9 additions and 4 deletions

View file

@ -768,6 +768,7 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
VkPipelineCreateFlagBits2KHR flags)
{
pipeline->type = LVP_PIPELINE_GRAPHICS;
pipeline->flags = flags;
VkResult result;
@ -1054,8 +1055,10 @@ static VkResult
lvp_compute_pipeline_init(struct lvp_pipeline *pipeline,
struct lvp_device *device,
struct lvp_pipeline_cache *cache,
const VkComputePipelineCreateInfo *pCreateInfo)
const VkComputePipelineCreateInfo *pCreateInfo,
VkPipelineCreateFlagBits2KHR flags)
{
pipeline->flags = flags;
pipeline->device = device;
pipeline->layout = lvp_pipeline_layout_from_handle(pCreateInfo->layout);
vk_pipeline_layout_ref(&pipeline->layout->vk);
@ -1097,7 +1100,7 @@ lvp_compute_pipeline_create(
vk_object_base_init(&device->vk, &pipeline->base,
VK_OBJECT_TYPE_PIPELINE);
uint64_t t0 = os_time_get_nano();
result = lvp_compute_pipeline_init(pipeline, device, cache, pCreateInfo);
result = lvp_compute_pipeline_init(pipeline, device, cache, pCreateInfo, flags);
if (result != VK_SUCCESS) {
vk_free(&device->vk.alloc, pipeline);
return result;
@ -1357,6 +1360,7 @@ lvp_exec_graph_pipeline_create(VkDevice _device, VkPipelineCache _cache,
uint64_t t0 = os_time_get_nano();
pipeline->type = LVP_PIPELINE_EXEC_GRAPH;
pipeline->flags = vk_graph_pipeline_create_flags(create_info);
pipeline->layout = lvp_pipeline_layout_from_handle(create_info->layout);
pipeline->exec_graph.scratch_size = 0;

View file

@ -526,6 +526,7 @@ struct lvp_pipeline {
struct lvp_pipeline_layout * layout;
enum lvp_pipeline_type type;
VkPipelineCreateFlags2KHR flags;
void *state_data;
bool force_min_sample;

View file

@ -1133,6 +1133,7 @@ lvp_create_ray_tracing_pipeline(VkDevice _device, const VkAllocationCallbacks *a
pipeline->device = device;
pipeline->layout = layout;
pipeline->type = LVP_PIPELINE_RAY_TRACING;
pipeline->flags = vk_rt_pipeline_create_flags(create_info);
pipeline->rt.stage_count = create_info->stageCount;
pipeline->rt.group_count = create_info->groupCount;
@ -1157,8 +1158,7 @@ lvp_create_ray_tracing_pipeline(VkDevice _device, const VkAllocationCallbacks *a
lvp_init_ray_tracing_groups(pipeline, create_info);
VkPipelineCreateFlags2KHR create_flags = vk_rt_pipeline_create_flags(create_info);
if (!(create_flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR)) {
if (!(pipeline->flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR)) {
lvp_compile_ray_tracing_pipeline(pipeline, create_info);
}