Fix builtin/VR case sensitivity on linux, fix r_useValidationsLayers on macOS when USE_MoltenVK set

This commit is contained in:
Stephen Saunders 2022-10-23 08:45:53 -04:00
parent 86bcffdd00
commit 2ffb89c80e
3 changed files with 13 additions and 22 deletions

View file

@ -10,7 +10,7 @@ file(GLOB post "builtin/post/*hlsl")
file(GLOB ssao "builtin/SSAO/*hlsl")
file(GLOB ssgi "builtin/SSGI/*hlsl")
file(GLOB video "builtin/video/*hlsl")
file(GLOB vr "builtin/vr/*hlsl")
file(GLOB vr "builtin/VR/*hlsl")
file(GLOB usershaders "*.hlsl")
list(REMOVE_ITEM usershaders ${globalshaders})
@ -26,7 +26,7 @@ source_group("builtin/post" FILES ${post})
source_group("builtin/SSAO" FILES ${ssao})
source_group("builtin/SSGI" FILES ${ssgi})
source_group("builtin/video" FILES ${video})
source_group("builtin/vr" FILES ${vr})
source_group("builtin/VR" FILES ${vr})
source_group("global" FILES ${globalshaders})
source_group("user" FILES ${usershaders})

View file

@ -98,12 +98,12 @@ builtin/video/bink.ps.hlsl -T ps_5_0 -D USE_SRGB={0,1}
builtin/video/bink_gui.vs.hlsl -T vs_5_0
builtin/video/bink_gui.ps.hlsl -T ps_5_0
builtin/vr/stereoDeGhost.vs.hlsl -T vs_5_0
builtin/vr/stereoDeGhost.ps.hlsl -T ps_5_0
builtin/vr/stereoInterlace.vs.hlsl -T vs_5_0
builtin/vr/stereoInterlace.ps.hlsl -T ps_5_0
builtin/vr/stereoWarp.vs.hlsl -T vs_5_0
builtin/vr/stereoWarp.ps.hlsl -T ps_5_0
builtin/VR/stereoDeGhost.vs.hlsl -T vs_5_0
builtin/VR/stereoDeGhost.ps.hlsl -T ps_5_0
builtin/VR/stereoInterlace.vs.hlsl -T vs_5_0
builtin/VR/stereoInterlace.ps.hlsl -T ps_5_0
builtin/VR/stereoWarp.vs.hlsl -T vs_5_0
builtin/VR/stereoWarp.ps.hlsl -T ps_5_0
# Compute shaders
builtin/mipmapgen.cs.hlsl -T cs_5_0 -D MODE={0,1,2,3}

View file

@ -35,8 +35,6 @@
// Define the Vulkan dynamic dispatcher - this needs to occur in exactly one cpp file in the program.
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
idCVar r_vkEnableValidationLayers( "r_vkEnableValidationLayers", "0", CVAR_BOOL | CVAR_INIT, "" );
class DeviceManager_VK : public DeviceManager
{
public:
@ -189,7 +187,6 @@ private:
VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
#endif
VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME,
VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
VK_EXT_DEBUG_UTILS_EXTENSION_NAME
},
// layers
@ -395,16 +392,6 @@ bool DeviceManager_VK::createInstance()
common->Printf( " %s\n", ext.c_str() );
}
// SRS - Enable validation layer at runtime based on cvar setting
if( r_vkEnableValidationLayers.GetBool() )
{
#if defined(__APPLE__) && defined(USE_MoltenVK)
enabledExtensions.layers.insert( "MoltenVK" );
#else
enabledExtensions.layers.insert( "VK_LAYER_KHRONOS_validation" );
#endif
}
std::unordered_set<std::string> requiredLayers = enabledExtensions.layers;
for( const auto& layer : vk::enumerateInstanceLayerProperties() )
@ -988,8 +975,12 @@ bool DeviceManager_VK::CreateDeviceAndSwapChain()
if( deviceParms.enableDebugRuntime )
{
enabledExtensions.instance.insert( "VK_EXT_debug_report" );
enabledExtensions.instance.insert( VK_EXT_DEBUG_REPORT_EXTENSION_NAME );
#if defined(__APPLE__) && defined(USE_MoltenVK)
enabledExtensions.layers.insert( "MoltenVK" );
#else
enabledExtensions.layers.insert( "VK_LAYER_KHRONOS_validation" );
#endif
}
const vk::DynamicLoader dl;