Fixed issue with MSAA textures on Oculus Quest.

This commit is contained in:
Dominic Filion Guay authored and baldurk committed 2019-09-18 19:28:42 +01:00
1 parent af97e50b3a
commit 57c60cdfb8
5 files changed
+19 -10

No files matched your search

+13 -3
View File
@@ -33,6 +33,7 @@ enum class FeatureCheck
ShaderMSAAStorage = 0x1,
FragmentStores = 0x2,
NonMetalBackend = 0x4,
FormatlessWrite = 0x8,
};
BITMASK_OPERATORS(FeatureCheck);
@@ -76,9 +77,10 @@ static const BuiltinShaderConfig builtinShaders[] = {
{BuiltinShader::TrisizeFS, EmbeddedResource(glsl_trisize_frag), rdcspv::ShaderStage::Fragment,
FeatureCheck::NoCheck, true},
{BuiltinShader::MS2ArrayCS, EmbeddedResource(glsl_ms2array_comp), rdcspv::ShaderStage::Compute,
FeatureCheck::ShaderMSAAStorage | FeatureCheck::NonMetalBackend, true},
FeatureCheck::FormatlessWrite | FeatureCheck::NonMetalBackend, true},
{BuiltinShader::Array2MSCS, EmbeddedResource(glsl_array2ms_comp), rdcspv::ShaderStage::Compute,
FeatureCheck::ShaderMSAAStorage | FeatureCheck::NonMetalBackend, true},
FeatureCheck::ShaderMSAAStorage | FeatureCheck::FormatlessWrite | FeatureCheck::NonMetalBackend,
true},
{BuiltinShader::DepthMS2ArrayFS, EmbeddedResource(glsl_depthms2arr_frag),
rdcspv::ShaderStage::Fragment, FeatureCheck::NonMetalBackend, true},
{BuiltinShader::DepthArray2MSFS, EmbeddedResource(glsl_deptharr2ms_frag),
@@ -146,7 +148,15 @@ VulkanShaderCache::VulkanShaderCache(WrappedVulkan *driver)
if(config.checks & FeatureCheck::ShaderMSAAStorage)
{
if(driverVersion.TexelFetchBrokenDriver() || driverVersion.AMDStorageMSAABrokenDriver() ||
!features.shaderStorageImageMultisample || !features.shaderStorageImageWriteWithoutFormat)
!features.shaderStorageImageMultisample)
{
continue;
}
}
if(config.checks & FeatureCheck::FormatlessWrite)
{
if(!features.shaderStorageImageWriteWithoutFormat)
{
continue;
}