mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-23 08: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)
|
||||
)
|
||||
|
||||
RETF(ARREQ(dynamicState.pDynamicStates, dynamicState.dynamicStateCount))
|
||||
|
||||
RETF(KEYNEQ(colorBlendState.flags) ||
|
||||
KEYNEQ(colorBlendState.logicOpEnable) ||
|
||||
KEYNEQ(colorBlendState.logicOp) ||
|
||||
@ -392,7 +394,7 @@ namespace skyline::gpu::cache {
|
||||
.pMultisampleState = &state.multisampleState,
|
||||
.pDepthStencilState = &state.depthStencilState,
|
||||
.pColorBlendState = &state.colorBlendState,
|
||||
.pDynamicState = nullptr,
|
||||
.pDynamicState = &state.dynamicState,
|
||||
.layout = *pipelineLayout,
|
||||
.renderPass = *renderPass,
|
||||
.subpass = 0,
|
||||
|
@ -29,6 +29,7 @@ namespace skyline::gpu::cache {
|
||||
const vk::PipelineMultisampleStateCreateInfo &multisampleState;
|
||||
const vk::PipelineDepthStencilStateCreateInfo &depthStencilState;
|
||||
const vk::PipelineColorBlendStateCreateInfo &colorBlendState;
|
||||
const vk::PipelineDynamicStateCreateInfo &dynamicState;
|
||||
|
||||
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
|
||||
@ -87,6 +88,7 @@ namespace skyline::gpu::cache {
|
||||
vk::PipelineMultisampleStateCreateInfo multisampleState;
|
||||
vk::PipelineDepthStencilStateCreateInfo depthStencilState;
|
||||
vk::PipelineColorBlendStateCreateInfo colorBlendState;
|
||||
vk::PipelineDynamicStateCreateInfo dynamicState;
|
||||
std::vector<vk::PipelineColorBlendAttachmentState> colorBlendAttachments;
|
||||
|
||||
std::vector<AttachmentMetadata> colorAttachments;
|
||||
|
@ -132,6 +132,7 @@ namespace skyline::gpu {
|
||||
.multisampleState = multisampleState,
|
||||
.depthStencilState = depthStencilState,
|
||||
.colorBlendState = blendState,
|
||||
.dynamicState = {},
|
||||
.colorAttachments = span<TextureView *>{colorAttachment},
|
||||
.depthStencilAttachment = nullptr,
|
||||
}, layoutBindings, pushConstantRanges);
|
||||
|
Loading…
Reference in New Issue
Block a user