a/vk: Add specialization_info argument to vk_create_compute_pipeline

This commit is contained in:
Jakob Bornecrantz 2022-04-18 10:50:09 +01:00
parent 068ec80f9d
commit 7ba7f43e83
3 changed files with 6 additions and 0 deletions

View file

@ -938,6 +938,7 @@ vk_create_compute_pipeline(struct vk_bundle *vk,
VkPipelineCache pipeline_cache,
VkShaderModule shader,
VkPipelineLayout pipeline_layout,
const VkSpecializationInfo *specialization_info,
VkPipeline *out_compute_pipeline);

View file

@ -173,6 +173,7 @@ vk_create_compute_pipeline(struct vk_bundle *vk,
VkPipelineCache pipeline_cache,
VkShaderModule shader,
VkPipelineLayout pipeline_layout,
const VkSpecializationInfo *specialization_info,
VkPipeline *out_compute_pipeline)
{
VkResult ret;
@ -183,6 +184,7 @@ vk_create_compute_pipeline(struct vk_bundle *vk,
.stage = VK_SHADER_STAGE_COMPUTE_BIT,
.module = shader,
.pName = "main",
.pSpecializationInfo = specialization_info,
};
VkComputePipelineCreateInfo pipeline_info = {

View file

@ -651,6 +651,7 @@ render_resources_init(struct render_resources *r,
r->pipeline_cache, // pipeline_cache
r->shaders->clear_comp, // shader
r->compute.pipeline_layout, // pipeline_layout
NULL, // specialization_info
&r->compute.clear_pipeline)); // out_compute_pipeline
C(vk_create_compute_pipeline( //
@ -658,6 +659,7 @@ render_resources_init(struct render_resources *r,
r->pipeline_cache, // pipeline_cache
r->shaders->distortion_comp, // shader
r->compute.pipeline_layout, // pipeline_layout
NULL, // specialization_info
&r->compute.distortion_pipeline)); // out_compute_pipeline
C(vk_create_compute_pipeline( //
@ -665,6 +667,7 @@ render_resources_init(struct render_resources *r,
r->pipeline_cache, // pipeline_cache
r->shaders->distortion_timewarp_comp, // shader
r->compute.pipeline_layout, // pipeline_layout
NULL, // specialization_info
&r->compute.distortion_timewarp_pipeline)); // out_compute_pipeline