From bd4d86f87a29cb2d64a9e3f56a6221688dfe5e1e Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 17 Sep 2019 15:44:03 +0300 Subject: [PATCH] vk: Properly test MSAA sample mask when switching between states inside a RSX renderpass. - Before, these changes would be lost if the same RTT config was used with varying mask setups --- rpcs3/Emu/RSX/VK/VKProgramBuffer.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpcs3/Emu/RSX/VK/VKProgramBuffer.h b/rpcs3/Emu/RSX/VK/VKProgramBuffer.h index 68d5ea1395..e0aba47569 100644 --- a/rpcs3/Emu/RSX/VK/VKProgramBuffer.h +++ b/rpcs3/Emu/RSX/VK/VKProgramBuffer.h @@ -40,6 +40,9 @@ namespace vk { if (memcmp(&state.ms, &other.state.ms, sizeof(VkPipelineMultisampleStateCreateInfo))) return false; + + if (state.temp_storage.msaa_sample_mask != other.state.temp_storage.msaa_sample_mask) + return false; } return true; @@ -57,6 +60,7 @@ namespace rpcs3 seed ^= hash_struct(pipelineProperties.state.ds); seed ^= hash_struct(pipelineProperties.state.rs); seed ^= hash_struct(pipelineProperties.state.ms); + seed ^= hash_base(pipelineProperties.state.temp_storage.msaa_sample_mask); // Do not compare pointers to memory! VkPipelineColorBlendStateCreateInfo tmp;