vk/graphics_state: Remove vk_subpass_info

It only has a subset of the renderpass state, whereas with turnip we
need to use pretty much all of it at one point or another. Just allow
the driver to pass in the entire vk_render_pass_state if it's using its
own renderpass implementation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22301>
This commit is contained in:
Connor Abbott
2023-03-29 10:28:25 +02:00
committed by Marge Bot
parent 282e73118d
commit 1d5eeefd9b
4 changed files with 20 additions and 41 deletions
+7 -5
View File
@@ -2242,8 +2242,8 @@ err_free_build_context:
return result;
}
static struct vk_subpass_info
pvr_create_subpass_info(const VkGraphicsPipelineCreateInfo *const info)
static struct vk_render_pass_state
pvr_create_renderpass_state(const VkGraphicsPipelineCreateInfo *const info)
{
PVR_FROM_HANDLE(pvr_render_pass, pass, info->renderPass);
const struct pvr_render_subpass *const subpass =
@@ -2263,8 +2263,10 @@ pvr_create_subpass_info(const VkGraphicsPipelineCreateInfo *const info)
pass->attachments[subpass->depth_stencil_attachment].aspects;
}
return (struct vk_subpass_info){
return (struct vk_render_pass_state){
.attachment_aspects = attachment_aspects,
.render_pass = info->renderPass,
.subpass = info->subpass,
/* TODO: This is only needed for VK_KHR_create_renderpass2 (or core 1.2),
* which is not currently supported.
@@ -2282,7 +2284,7 @@ pvr_graphics_pipeline_init(struct pvr_device *device,
{
struct vk_dynamic_graphics_state *const dynamic_state =
&gfx_pipeline->dynamic_state;
const struct vk_subpass_info sp_info = pvr_create_subpass_info(pCreateInfo);
const struct vk_render_pass_state rp_state = pvr_create_renderpass_state(pCreateInfo);
struct vk_graphics_pipeline_all_state all_state;
struct vk_graphics_pipeline_state state = { 0 };
@@ -2294,7 +2296,7 @@ pvr_graphics_pipeline_init(struct pvr_device *device,
result = vk_graphics_pipeline_state_fill(&device->vk,
&state,
pCreateInfo,
&sp_info,
&rp_state,
&all_state,
NULL,
0,