mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +01:00
[dxvk] Only enable dynamic MSAA state if sample shading is enabled
Otherwise, create a more specialized fragment output library on demand. May help RADV since dynamic alpha-to-coverage triggers a less efficient code path.
This commit is contained in:
parent
306919047b
commit
f212cc8f7d
@ -4954,7 +4954,8 @@ namespace dxvk {
|
||||
if (m_device->features().core.features.depthBounds)
|
||||
m_flags.set(DxvkContextFlag::GpDynamicDepthBounds);
|
||||
|
||||
if (m_device->features().extExtendedDynamicState3.extendedDynamicState3RasterizationSamples
|
||||
if (m_state.gp.flags.test(DxvkGraphicsPipelineFlag::HasSampleRateShading)
|
||||
&& m_device->features().extExtendedDynamicState3.extendedDynamicState3RasterizationSamples
|
||||
&& m_device->features().extExtendedDynamicState3.extendedDynamicState3SampleMask)
|
||||
m_flags.set(DxvkContextFlag::GpDynamicMultisampleState);
|
||||
} else {
|
||||
|
@ -397,7 +397,8 @@ namespace dxvk {
|
||||
std::array<VkDynamicState, 4> dynamicStates = { };
|
||||
|
||||
if (m_device->features().extExtendedDynamicState3.extendedDynamicState3RasterizationSamples
|
||||
&& m_device->features().extExtendedDynamicState3.extendedDynamicState3SampleMask) {
|
||||
&& m_device->features().extExtendedDynamicState3.extendedDynamicState3SampleMask
|
||||
&& state.msInfo.sampleShadingEnable) {
|
||||
dynamicStates[dynamicStateCount++] = VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT;
|
||||
dynamicStates[dynamicStateCount++] = VK_DYNAMIC_STATE_SAMPLE_MASK_EXT;
|
||||
|
||||
@ -891,6 +892,9 @@ namespace dxvk {
|
||||
|
||||
if (m_barrier.access & VK_ACCESS_SHADER_WRITE_BIT)
|
||||
m_flags.set(DxvkGraphicsPipelineFlag::HasStorageDescriptors);
|
||||
|
||||
if (m_shaders.fs != nullptr && m_shaders.fs->flags().test(DxvkShaderFlag::HasSampleRateShading))
|
||||
m_flags.set(DxvkGraphicsPipelineFlag::HasSampleRateShading);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,6 +30,7 @@ namespace dxvk {
|
||||
HasRasterizerDiscard,
|
||||
HasTransformFeedback,
|
||||
HasStorageDescriptors,
|
||||
HasSampleRateShading,
|
||||
};
|
||||
|
||||
using DxvkGraphicsPipelineFlags = Flags<DxvkGraphicsPipelineFlag>;
|
||||
|
Loading…
Reference in New Issue
Block a user