return result;
}
+static VkResult
+create_pipeline_layout(struct radv_device *device, VkPipelineLayout *layout)
+{
+ VkPipelineLayoutCreateInfo pl_create_info = {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
+ .setLayoutCount = 0,
+ .pSetLayouts = NULL,
+ .pushConstantRangeCount = 0,
+ .pPushConstantRanges = NULL,
+ };
+
+ return radv_CreatePipelineLayout(radv_device_to_handle(device),
+ &pl_create_info,
+ &device->meta_state.alloc,
+ layout);
+}
+
static VkResult
create_pipeline(struct radv_device *device,
VkShaderModule vs_module_h,
uint32_t samples,
VkRenderPass pass,
+ VkPipelineLayout layout,
VkPipeline *decompress_pipeline,
VkPipeline *resummarize_pipeline)
{
VK_DYNAMIC_STATE_SCISSOR,
},
},
+ .layout = layout,
.renderPass = pass,
.subpass = 0,
};
radv_DestroyRenderPass(radv_device_to_handle(device),
state->depth_decomp[i].pass,
&state->alloc);
+ radv_DestroyPipelineLayout(radv_device_to_handle(device),
+ state->depth_decomp[i].p_layout,
+ &state->alloc);
radv_DestroyPipeline(radv_device_to_handle(device),
state->depth_decomp[i].decompress_pipeline,
&state->alloc);
if (res != VK_SUCCESS)
goto fail;
+ res = create_pipeline_layout(device,
+ &state->depth_decomp[i].p_layout);
+ if (res != VK_SUCCESS)
+ goto fail;
+
res = create_pipeline(device, vs_module_h, samples,
state->depth_decomp[i].pass,
+ state->depth_decomp[i].p_layout,
&state->depth_decomp[i].decompress_pipeline,
&state->depth_decomp[i].resummarize_pipeline);
if (res != VK_SUCCESS)
return result;
}
+static VkResult
+create_pipeline_layout(struct radv_device *device, VkPipelineLayout *layout)
+{
+ VkPipelineLayoutCreateInfo pl_create_info = {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
+ .setLayoutCount = 0,
+ .pSetLayouts = NULL,
+ .pushConstantRangeCount = 0,
+ .pPushConstantRanges = NULL,
+ };
+
+ return radv_CreatePipelineLayout(radv_device_to_handle(device),
+ &pl_create_info,
+ &device->meta_state.alloc,
+ layout);
+}
+
static VkResult
create_pipeline(struct radv_device *device,
- VkShaderModule vs_module_h)
+ VkShaderModule vs_module_h,
+ VkPipelineLayout layout)
{
VkResult result;
VkDevice device_h = radv_device_to_handle(device);
VK_DYNAMIC_STATE_SCISSOR,
},
},
+ .layout = layout,
.renderPass = device->meta_state.fast_clear_flush.pass,
.subpass = 0,
},
VK_DYNAMIC_STATE_SCISSOR,
},
},
+ .layout = layout,
.renderPass = device->meta_state.fast_clear_flush.pass,
.subpass = 0,
},
radv_DestroyRenderPass(radv_device_to_handle(device),
state->fast_clear_flush.pass, &state->alloc);
+ radv_DestroyPipelineLayout(radv_device_to_handle(device),
+ state->fast_clear_flush.p_layout,
+ &state->alloc);
radv_DestroyPipeline(radv_device_to_handle(device),
state->fast_clear_flush.cmask_eliminate_pipeline,
&state->alloc);
if (res != VK_SUCCESS)
goto fail;
+ res = create_pipeline_layout(device,
+ &device->meta_state.fast_clear_flush.p_layout);
+ if (res != VK_SUCCESS)
+ goto fail;
+
VkShaderModule vs_module_h = radv_shader_module_to_handle(&vs_module);
- res = create_pipeline(device, vs_module_h);
+ res = create_pipeline(device, vs_module_h,
+ device->meta_state.fast_clear_flush.p_layout);
if (res != VK_SUCCESS)
goto fail;
goto cleanup;
}
+ VkPipelineLayoutCreateInfo pl_create_info = {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
+ .setLayoutCount = 0,
+ .pSetLayouts = NULL,
+ .pushConstantRangeCount = 0,
+ .pPushConstantRanges = NULL,
+ };
+
+ result = radv_CreatePipelineLayout(radv_device_to_handle(device),
+ &pl_create_info,
+ &device->meta_state.alloc,
+ &device->meta_state.resolve.p_layout);
+ if (result != VK_SUCCESS)
+ goto cleanup;
+
result = radv_graphics_pipeline_create(device_h,
radv_pipeline_cache_to_handle(&device->meta_state.cache),
&(VkGraphicsPipelineCreateInfo) {
VK_DYNAMIC_STATE_SCISSOR,
},
},
+ .layout = device->meta_state.resolve.p_layout,
.renderPass = device->meta_state.resolve.pass,
.subpass = 0,
},
radv_DestroyRenderPass(radv_device_to_handle(device),
state->resolve.pass, &state->alloc);
+ radv_DestroyPipelineLayout(radv_device_to_handle(device),
+ state->resolve.p_layout, &state->alloc);
radv_DestroyPipeline(radv_device_to_handle(device),
state->resolve.pipeline, &state->alloc);
}
} cleari;
struct {
+ VkPipelineLayout p_layout;
VkPipeline pipeline;
VkRenderPass pass;
} resolve;
} resolve_fragment;
struct {
+ VkPipelineLayout p_layout;
VkPipeline decompress_pipeline;
VkPipeline resummarize_pipeline;
VkRenderPass pass;
} depth_decomp[1 + MAX_SAMPLES_LOG2];
struct {
+ VkPipelineLayout p_layout;
VkPipeline cmask_eliminate_pipeline;
VkPipeline fmask_decompress_pipeline;
VkRenderPass pass;