mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-23 12:19:17 +01:00
Add dynamic state support to VK graphics pipeline cache
This commit is contained in:
parent
ad045058ee
commit
2f2b615780
@ -280,6 +280,8 @@ namespace skyline::gpu::cache {
|
|||||||
KEYNEQ(depthStencilState.maxDepthBounds)
|
KEYNEQ(depthStencilState.maxDepthBounds)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
RETF(ARREQ(dynamicState.pDynamicStates, dynamicState.dynamicStateCount))
|
||||||
|
|
||||||
RETF(KEYNEQ(colorBlendState.flags) ||
|
RETF(KEYNEQ(colorBlendState.flags) ||
|
||||||
KEYNEQ(colorBlendState.logicOpEnable) ||
|
KEYNEQ(colorBlendState.logicOpEnable) ||
|
||||||
KEYNEQ(colorBlendState.logicOp) ||
|
KEYNEQ(colorBlendState.logicOp) ||
|
||||||
@ -392,7 +394,7 @@ namespace skyline::gpu::cache {
|
|||||||
.pMultisampleState = &state.multisampleState,
|
.pMultisampleState = &state.multisampleState,
|
||||||
.pDepthStencilState = &state.depthStencilState,
|
.pDepthStencilState = &state.depthStencilState,
|
||||||
.pColorBlendState = &state.colorBlendState,
|
.pColorBlendState = &state.colorBlendState,
|
||||||
.pDynamicState = nullptr,
|
.pDynamicState = &state.dynamicState,
|
||||||
.layout = *pipelineLayout,
|
.layout = *pipelineLayout,
|
||||||
.renderPass = *renderPass,
|
.renderPass = *renderPass,
|
||||||
.subpass = 0,
|
.subpass = 0,
|
||||||
|
@ -29,6 +29,7 @@ namespace skyline::gpu::cache {
|
|||||||
const vk::PipelineMultisampleStateCreateInfo &multisampleState;
|
const vk::PipelineMultisampleStateCreateInfo &multisampleState;
|
||||||
const vk::PipelineDepthStencilStateCreateInfo &depthStencilState;
|
const vk::PipelineDepthStencilStateCreateInfo &depthStencilState;
|
||||||
const vk::PipelineColorBlendStateCreateInfo &colorBlendState;
|
const vk::PipelineColorBlendStateCreateInfo &colorBlendState;
|
||||||
|
const vk::PipelineDynamicStateCreateInfo &dynamicState;
|
||||||
|
|
||||||
span<TextureView *> colorAttachments; //!< All color attachments in the subpass of this pipeline
|
span<TextureView *> colorAttachments; //!< All color attachments in the subpass of this pipeline
|
||||||
TextureView *depthStencilAttachment; //!< A nullable pointer to the depth/stencil attachment in the subpass of this pipeline
|
TextureView *depthStencilAttachment; //!< A nullable pointer to the depth/stencil attachment in the subpass of this pipeline
|
||||||
@ -87,6 +88,7 @@ namespace skyline::gpu::cache {
|
|||||||
vk::PipelineMultisampleStateCreateInfo multisampleState;
|
vk::PipelineMultisampleStateCreateInfo multisampleState;
|
||||||
vk::PipelineDepthStencilStateCreateInfo depthStencilState;
|
vk::PipelineDepthStencilStateCreateInfo depthStencilState;
|
||||||
vk::PipelineColorBlendStateCreateInfo colorBlendState;
|
vk::PipelineColorBlendStateCreateInfo colorBlendState;
|
||||||
|
vk::PipelineDynamicStateCreateInfo dynamicState;
|
||||||
std::vector<vk::PipelineColorBlendAttachmentState> colorBlendAttachments;
|
std::vector<vk::PipelineColorBlendAttachmentState> colorBlendAttachments;
|
||||||
|
|
||||||
std::vector<AttachmentMetadata> colorAttachments;
|
std::vector<AttachmentMetadata> colorAttachments;
|
||||||
|
@ -132,6 +132,7 @@ namespace skyline::gpu {
|
|||||||
.multisampleState = multisampleState,
|
.multisampleState = multisampleState,
|
||||||
.depthStencilState = depthStencilState,
|
.depthStencilState = depthStencilState,
|
||||||
.colorBlendState = blendState,
|
.colorBlendState = blendState,
|
||||||
|
.dynamicState = {},
|
||||||
.colorAttachments = span<TextureView *>{colorAttachment},
|
.colorAttachments = span<TextureView *>{colorAttachment},
|
||||||
.depthStencilAttachment = nullptr,
|
.depthStencilAttachment = nullptr,
|
||||||
}, layoutBindings, pushConstantRanges);
|
}, layoutBindings, pushConstantRanges);
|
||||||
|
Loading…
Reference in New Issue
Block a user