mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
rsx: Check all attachments when generating pipeline hash key
This commit is contained in:
parent
f745971cc8
commit
0031c41630
1 changed files with 9 additions and 5 deletions
|
@ -22,18 +22,19 @@ namespace vk
|
||||||
if (memcmp(&state.ia, &other.state.ia, sizeof(VkPipelineInputAssemblyStateCreateInfo)))
|
if (memcmp(&state.ia, &other.state.ia, sizeof(VkPipelineInputAssemblyStateCreateInfo)))
|
||||||
return false;
|
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)))
|
if (memcmp(&state.rs, &other.state.rs, sizeof(VkPipelineRasterizationStateCreateInfo)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Cannot memcmp cs due to pAttachments being a pointer to memory
|
// 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 ||
|
state.cs.logicOpEnable != other.state.cs.logicOpEnable ||
|
||||||
memcmp(state.cs.blendConstants, other.state.cs.blendConstants, 4 * sizeof(f32)))
|
memcmp(state.cs.blendConstants, other.state.cs.blendConstants, 4 * sizeof(f32)))
|
||||||
return false;
|
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)))
|
if (memcmp(&state.ds, &other.state.ds, sizeof(VkPipelineDepthStencilStateCreateInfo)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -180,7 +181,10 @@ namespace rpcs3
|
||||||
memcpy(&tmp, &pipelineProperties.state.cs, sizeof(VkPipelineColorBlendStateCreateInfo));
|
memcpy(&tmp, &pipelineProperties.state.cs, sizeof(VkPipelineColorBlendStateCreateInfo));
|
||||||
tmp.pAttachments = nullptr;
|
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);
|
return hash_base(seed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue