1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2025-02-15 09:40:05 +00:00

rsx: Check all attachments when generating pipeline hash key

This commit is contained in:
kd-11 2021-08-07 19:04:19 +03:00 committed by kd-11
parent f745971cc8
commit 0031c41630

@ -22,18 +22,19 @@ namespace vk
if (memcmp(&state.ia, &other.state.ia, sizeof(VkPipelineInputAssemblyStateCreateInfo)))
return false;
if (memcmp(&state.att_state[0], &other.state.att_state[0], sizeof(VkPipelineColorBlendAttachmentState)))
return false;
if (memcmp(&state.rs, &other.state.rs, sizeof(VkPipelineRasterizationStateCreateInfo)))
return false;
// Cannot memcmp cs due to pAttachments being a pointer to memory
if (state.cs.logicOp != other.state.cs.logicOp ||
if (state.cs.attachmentCount != other.state.cs.attachmentCount ||
state.cs.logicOp != other.state.cs.logicOp ||
state.cs.logicOpEnable != other.state.cs.logicOpEnable ||
memcmp(state.cs.blendConstants, other.state.cs.blendConstants, 4 * sizeof(f32)))
return false;
if (memcmp(state.att_state, &other.state.att_state, state.cs.attachmentCount * sizeof(VkPipelineColorBlendAttachmentState)))
return false;
if (memcmp(&state.ds, &other.state.ds, sizeof(VkPipelineDepthStencilStateCreateInfo)))
return false;
@ -180,7 +181,10 @@ namespace rpcs3
memcpy(&tmp, &pipelineProperties.state.cs, sizeof(VkPipelineColorBlendStateCreateInfo));
tmp.pAttachments = nullptr;
seed ^= hash_struct(pipelineProperties.state.att_state[0]);
for (usz i = 0; i < pipelineProperties.state.cs.attachmentCount; ++i)
{
seed ^= hash_struct(pipelineProperties.state.att_state[i]);
}
return hash_base(seed);
}
}