1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-04 16:24:29 +01:00

[dxvk] Dirty multisample state if sample mask export changes.

This affects Alpha-to-Coverage.
This commit is contained in:
Philip Rebohle 2023-08-01 18:07:47 +02:00
parent d66f8385c3
commit 09857dcaa9

View File

@ -4961,6 +4961,7 @@ namespace dxvk {
DxvkGraphicsPipelineFlags oldFlags = m_state.gp.flags; DxvkGraphicsPipelineFlags oldFlags = m_state.gp.flags;
DxvkGraphicsPipelineFlags newFlags = newPipeline->flags(); DxvkGraphicsPipelineFlags newFlags = newPipeline->flags();
DxvkGraphicsPipelineFlags diffFlags = oldFlags ^ newFlags;
DxvkGraphicsPipelineFlags hazardMask( DxvkGraphicsPipelineFlags hazardMask(
DxvkGraphicsPipelineFlag::HasTransformFeedback, DxvkGraphicsPipelineFlag::HasTransformFeedback,
@ -4968,7 +4969,7 @@ namespace dxvk {
m_state.gp.flags = newFlags; m_state.gp.flags = newFlags;
if (((oldFlags ^ newFlags) & hazardMask) != 0) { if ((diffFlags & hazardMask) != 0) {
// Force-update vertex/index buffers for hazard checks // Force-update vertex/index buffers for hazard checks
m_flags.set(DxvkContextFlag::GpDirtyIndexBuffer, m_flags.set(DxvkContextFlag::GpDirtyIndexBuffer,
DxvkContextFlag::GpDirtyVertexBuffers, DxvkContextFlag::GpDirtyVertexBuffers,
@ -4981,6 +4982,9 @@ namespace dxvk {
this->spillRenderPass(true); this->spillRenderPass(true);
} }
if (diffFlags.test(DxvkGraphicsPipelineFlag::HasSampleMaskExport))
m_flags.set(DxvkContextFlag::GpDirtyMultisampleState);
m_descriptorState.dirtyStages(VK_SHADER_STAGE_ALL_GRAPHICS); m_descriptorState.dirtyStages(VK_SHADER_STAGE_ALL_GRAPHICS);
if (newPipeline->getBindings()->layout().getPushConstantRange().size) if (newPipeline->getBindings()->layout().getPushConstantRange().size)