From bb99bc0538f8c01310b0cc42e7adb6cd6aa4c3fc Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sat, 28 Dec 2024 18:00:07 -0800 Subject: [PATCH] Remove atomic usage for RG32Uint. --- MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm | 2 +- MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm b/MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm index a7cd05595..c86070361 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm @@ -296,7 +296,7 @@ if ( mvkIsAnyFlagEnabled(_buffer->getUsage(), VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT) ) { usage |= MTLTextureUsageShaderWrite; #if MVK_XCODE_15 - if (getMetalFeatures().nativeTextureAtomics && (_mtlPixelFormat == MTLPixelFormatR32Sint || _mtlPixelFormat == MTLPixelFormatR32Uint || _mtlPixelFormat == MTLPixelFormatRG32Uint)) + if (getMetalFeatures().nativeTextureAtomics && (_mtlPixelFormat == MTLPixelFormatR32Sint || _mtlPixelFormat == MTLPixelFormatR32Uint)) usage |= MTLTextureUsageShaderAtomic; #endif } diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm index 40af78bb8..0d4eedbd0 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm @@ -748,7 +748,7 @@ } #if MVK_XCODE_15 - if (supportAtomics && (mtlFormat == MTLPixelFormatR32Uint || mtlFormat == MTLPixelFormatR32Sint || mtlFormat == MTLPixelFormatRG32Uint)) { + if (supportAtomics && (mtlFormat == MTLPixelFormatR32Uint || mtlFormat == MTLPixelFormatR32Sint)) { mvkEnableFlags(mtlUsage, MTLTextureUsageShaderAtomic); } #endif @@ -1542,7 +1542,6 @@ // Including this here so we remember to update this if support is added to Vulkan in the future. bool atomic64 = noVulkanSupport && (gpuCaps.supportsApple9 || (gpuCaps.supportsApple8 && gpuCaps.supportsMac2)); enableMTLPixFmtCapsIf( atomic64, RG32Uint, Atomic ); - enableMTLPixFmtCapsIf( atomic64, RG32Sint, Atomic ); setMTLPixFmtCapsIf( iosOnly8, RG32Float, RWCMB ); setMTLPixFmtCapsIf( iosOnly6, RG32Float, RWCB );