mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-13 22:22:05 +00:00
Disable MoltenVK's Metal Argument Buffers to avoid HiZ shader issues on Apple Silicon
This commit is contained in:
parent
4904fdbf1b
commit
340ef8e5bc
2 changed files with 7 additions and 2 deletions
|
@ -18,6 +18,6 @@ fi
|
|||
# note 2: policy CMAKE_POLICY_DEFAULT_CMP0142=NEW suppresses non-existant per-config suffixes on Xcode library search paths, works for cmake version 3.25 and later
|
||||
# note 3: env variable MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE=1 enables MoltenVK's image view swizzle which may be required on older macOS versions or hardware (see vulkaninfo) - only used for VulkanSDK < 1.3.275
|
||||
# note 4: env variable MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS=0 disables synchronous queue submits which is optimal for the synchronization method used by the game - only used for VulkanSDK < 1.3.275
|
||||
# note 5: env variable MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=1 enables MoltenVK's use of Metal argument buffers - needed for descriptor resource scaling and VulkanSDK < 1.3.275
|
||||
# note 5: env variable MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=1 enables MoltenVK's use of Metal argument buffers - only used for VulkanSDK < 1.3.275
|
||||
# note 6: env variable MVK_CONFIG_TIMESTAMP_PERIOD_LOWPASS_ALPHA=1.0 disables MoltenVK's timestampPeriod lowpass filter for non-Apple GPUs - only used for VulkanSDK < 1.3.275
|
||||
cmake -G Xcode -DCMAKE_BUILD_TYPE=Debug -DCMAKE_XCODE_GENERATE_SCHEME=ON -DCMAKE_XCODE_SCHEME_ENVIRONMENT="MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE=1;MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS=0;MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=1;MVK_CONFIG_TIMESTAMP_PERIOD_LOWPASS_ALPHA=1.0" -DCMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION=OFF -DCMAKE_SUPPRESS_REGENERATION=ON -DOPENAL_LIBRARY=$OPENAL_PREFIX/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=$OPENAL_PREFIX/include ../neo -DCMAKE_POLICY_DEFAULT_CMP0142=NEW -Wno-dev
|
||||
|
|
|
@ -49,7 +49,12 @@
|
|||
#include <MoltenVK/vk_mvk_moltenvk.h> // SRS - now deprecated, but provides backwards compatibility for MoltenVK < 1.2.7 / SDK < 1.3.275.0
|
||||
#endif
|
||||
#endif
|
||||
#if defined( VK_EXT_layer_settings ) || defined( USE_MoltenVK )
|
||||
#if defined( VK_EXT_layer_settings )
|
||||
// SRS - Disable Metal Argument Buffers for Vulkan SDK >= 1.3.275.0 to avoid HiZ compute shader issues on Apple Silicon
|
||||
idCVar r_mvkSynchronousQueueSubmits( "r_mvkSynchronousQueueSubmits", "0", CVAR_BOOL | CVAR_INIT | CVAR_NEW, "Use MoltenVK's synchronous queue submit option." );
|
||||
idCVar r_mvkUseMetalArgumentBuffers( "r_mvkUseMetalArgumentBuffers", "0", CVAR_INTEGER | CVAR_INIT | CVAR_NEW, "Use MoltenVK's Metal argument buffers option (0=Off, 1=On)", 0, 1 );
|
||||
#elif defined( USE_MoltenVK )
|
||||
// SRS - Enable Metal Argument Buffers for Vulkan SDK < 1.3.275.0 to work around SPIRV-Cross issue for Metal conversion
|
||||
idCVar r_mvkSynchronousQueueSubmits( "r_mvkSynchronousQueueSubmits", "0", CVAR_BOOL | CVAR_INIT | CVAR_NEW, "Use MoltenVK's synchronous queue submit option." );
|
||||
idCVar r_mvkUseMetalArgumentBuffers( "r_mvkUseMetalArgumentBuffers", "1", CVAR_INTEGER | CVAR_INIT | CVAR_NEW, "Use MoltenVK's Metal argument buffers option (0=Off, 1=On)", 0, 1 );
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue