mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 13:01:50 +01:00
Properly hash dynamic states in pipeline cache
This commit is contained in:
parent
7c4b4765bf
commit
9115b8cae8
@ -25,6 +25,8 @@ namespace skyline::gpu::cache {
|
|||||||
multisampleState(state.multisampleState),
|
multisampleState(state.multisampleState),
|
||||||
depthStencilState(state.depthStencilState),
|
depthStencilState(state.depthStencilState),
|
||||||
colorBlendState(state.colorBlendState),
|
colorBlendState(state.colorBlendState),
|
||||||
|
dynamicStates(VEC_CPY(dynamicState.pDynamicStates, dynamicState.dynamicStateCount)),
|
||||||
|
dynamicState(state.dynamicState),
|
||||||
colorBlendAttachments(VEC_CPY(colorBlendState.pAttachments, colorBlendState.attachmentCount)) {
|
colorBlendAttachments(VEC_CPY(colorBlendState.pAttachments, colorBlendState.attachmentCount)) {
|
||||||
auto &vertexInputState{vertexState.get<vk::PipelineVertexInputStateCreateInfo>()};
|
auto &vertexInputState{vertexState.get<vk::PipelineVertexInputStateCreateInfo>()};
|
||||||
vertexInputState.pVertexBindingDescriptions = vertexBindings.data();
|
vertexInputState.pVertexBindingDescriptions = vertexBindings.data();
|
||||||
@ -36,6 +38,8 @@ namespace skyline::gpu::cache {
|
|||||||
|
|
||||||
colorBlendState.pAttachments = colorBlendAttachments.data();
|
colorBlendState.pAttachments = colorBlendAttachments.data();
|
||||||
|
|
||||||
|
dynamicState.pDynamicStates = dynamicStates.data();
|
||||||
|
|
||||||
for (auto &colorFormat : state.colorFormats)
|
for (auto &colorFormat : state.colorFormats)
|
||||||
colorFormats.emplace_back(colorFormat);
|
colorFormats.emplace_back(colorFormat);
|
||||||
|
|
||||||
@ -164,10 +168,11 @@ namespace skyline::gpu::cache {
|
|||||||
HASH(static_cast<VkBlendFactor>(attachment.srcColorBlendFactor));
|
HASH(static_cast<VkBlendFactor>(attachment.srcColorBlendFactor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HASH(key.dynamicState.dynamicStateCount);
|
||||||
|
|
||||||
HASH(key.colorFormats.size());
|
HASH(key.colorFormats.size());
|
||||||
for (auto format : key.colorFormats) {
|
for (auto format : key.colorFormats)
|
||||||
HASH(format);
|
HASH(format);
|
||||||
}
|
|
||||||
|
|
||||||
HASH(key.depthStencilFormat);
|
HASH(key.depthStencilFormat);
|
||||||
HASH(key.sampleCount);
|
HASH(key.sampleCount);
|
||||||
|
@ -88,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;
|
||||||
|
std::vector<vk::DynamicState> dynamicStates;
|
||||||
vk::PipelineDynamicStateCreateInfo dynamicState;
|
vk::PipelineDynamicStateCreateInfo dynamicState;
|
||||||
std::vector<vk::PipelineColorBlendAttachmentState> colorBlendAttachments;
|
std::vector<vk::PipelineColorBlendAttachmentState> colorBlendAttachments;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user