Skip to content

Commit

Permalink
Remove atomic usage for RG32Uint.
Browse files Browse the repository at this point in the history
  • Loading branch information
squidbus committed Dec 29, 2024
1 parent 5ad3ee5 commit bb99bc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit bb99bc0

Please sign in to comment.