mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-27 08:05:42 +00:00
Detect MoltenVK and disable use of MSAA arrays until it's supported
This commit is contained in:
@@ -345,7 +345,8 @@
|
||||
CheckExt(EXT_vertex_attribute_divisor, VKXX); \
|
||||
CheckExt(EXT_sampler_filter_minmax, VKXX); \
|
||||
CheckExt(KHR_sampler_ycbcr_conversion, VK11); \
|
||||
CheckExt(KHR_device_group, VK11);
|
||||
CheckExt(KHR_device_group, VK11); \
|
||||
CheckExt(MVK_moltenvk, VKXX);
|
||||
|
||||
#define HookInitVulkanInstanceExts() \
|
||||
HookInitExtension(KHR_surface, DestroySurfaceKHR); \
|
||||
|
||||
@@ -33,6 +33,8 @@ enum class FeatureCheck
|
||||
NoCheck = 0x0,
|
||||
ShaderMSAAStorage = 0x1,
|
||||
FragmentStores = 0x2,
|
||||
// only unsupported on MoltenVK
|
||||
MSAAArrays = 0x4,
|
||||
};
|
||||
|
||||
BITMASK_OPERATORS(FeatureCheck);
|
||||
@@ -82,7 +84,7 @@ static const BuiltinShaderConfig builtinShaders[] = {
|
||||
{BuiltinShader::Array2MSCS, EmbeddedResource(glsl_array2ms_comp), SPIRVShaderStage::Compute,
|
||||
FeatureCheck::ShaderMSAAStorage, true},
|
||||
{BuiltinShader::DepthMS2ArrayFS, EmbeddedResource(glsl_depthms2arr_frag),
|
||||
SPIRVShaderStage::Fragment, FeatureCheck::NoCheck, true},
|
||||
SPIRVShaderStage::Fragment, FeatureCheck::MSAAArrays, true},
|
||||
{BuiltinShader::DepthArray2MSFS, EmbeddedResource(glsl_deptharr2ms_frag),
|
||||
SPIRVShaderStage::Fragment, FeatureCheck::NoCheck, true},
|
||||
};
|
||||
@@ -154,6 +156,13 @@ VulkanShaderCache::VulkanShaderCache(WrappedVulkan *driver)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(config.checks & FeatureCheck::MSAAArrays)
|
||||
{
|
||||
// for now we don't allow it at all - in future we could check on whether it's been enabled
|
||||
if(driver->GetExtensions(GetRecord(m_Device)).ext_MVK_moltenvk)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(config.stage == SPIRVShaderStage::Geometry && !features.geometryShader)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -1064,6 +1064,15 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
|
||||
RDCLOG("Enabling VK_AMD_gpa_interface");
|
||||
}
|
||||
|
||||
// enable VK_AMD_gpa_interface if it's available, for detecting/controlling moltenvk.
|
||||
// Currently this is used opaquely (extension present or not) rather than using anything the
|
||||
// extension provides.
|
||||
if(supportedExtensions.find("VK_MVK_moltenvk") != supportedExtensions.end())
|
||||
{
|
||||
Extensions.push_back("VK_MVK_moltenvk");
|
||||
RDCLOG("Enabling VK_MVK_moltenvk");
|
||||
}
|
||||
|
||||
createInfo.enabledLayerCount = (uint32_t)Layers.size();
|
||||
|
||||
const char **layerArray = NULL;
|
||||
|
||||
Reference in New Issue
Block a user