mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
[dxvk] Improve behaviour when variableMultisampleRate is not supported
This commit is contained in:
parent
8d9d9912ff
commit
c4516c5b04
@ -349,6 +349,13 @@ namespace dxvk {
|
||||
extensionsEnabled.merge(m_extraExtensions);
|
||||
DxvkNameList extensionNameList = extensionsEnabled.toNameList();
|
||||
|
||||
// Always enable robust buffer access
|
||||
enabledFeatures.core.features.robustBufferAccess = VK_TRUE;
|
||||
|
||||
// Enable variable multisample rate if supported
|
||||
enabledFeatures.core.features.variableMultisampleRate =
|
||||
m_deviceFeatures.core.features.variableMultisampleRate;
|
||||
|
||||
// Optionally used by some client API extensions
|
||||
enabledFeatures.vk12.drawIndirectCount =
|
||||
m_deviceFeatures.vk12.drawIndirectCount;
|
||||
|
@ -54,6 +54,13 @@ namespace dxvk {
|
||||
// that we don't have to scan device features at draw time
|
||||
if (m_device->mustTrackPipelineLifetime())
|
||||
m_features.set(DxvkContextFeature::TrackGraphicsPipeline);
|
||||
|
||||
// Variable multisample rate is needed to efficiently support
|
||||
// rendering without bound render targets, otherwise we may
|
||||
// have to interrupt the current render pass whenever the
|
||||
// requested rasterizer sample count changes
|
||||
if (m_device->features().core.features.variableMultisampleRate)
|
||||
m_features.set(DxvkContextFeature::VariableMultisampleRate);
|
||||
}
|
||||
|
||||
|
||||
@ -2458,6 +2465,11 @@ namespace dxvk {
|
||||
m_flags.set(DxvkContextFlag::GpDirtyRasterizerState);
|
||||
}
|
||||
|
||||
if (unlikely(!m_features.test(DxvkContextFeature::VariableMultisampleRate))) {
|
||||
if (rs.sampleCount != m_state.gp.state.rs.sampleCount())
|
||||
m_flags.set(DxvkContextFlag::GpDirtyFramebuffer);
|
||||
}
|
||||
|
||||
DxvkRsInfo rsInfo(
|
||||
rs.depthClipEnable,
|
||||
rs.depthBiasEnable,
|
||||
|
@ -62,6 +62,7 @@ namespace dxvk {
|
||||
*/
|
||||
enum class DxvkContextFeature : uint32_t {
|
||||
TrackGraphicsPipeline,
|
||||
VariableMultisampleRate,
|
||||
FeatureCount
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user