Skip to content

Commit

Permalink
Merge branch 'main' into ue4-nastys-patch-env
Browse files Browse the repository at this point in the history
  • Loading branch information
italomandara committed Mar 7, 2024
2 parents 1f49419 + 5d21869 commit eadfee0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MoltenVK/MoltenVK/GPUObjects/MVKBuffer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
if ( mvkIsAnyFlagEnabled(_buffer->getUsage(), VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT) ) {
usage |= MTLTextureUsageShaderWrite;
#if MVK_XCODE_15
if (getPhysicalDevice()->useNativeTextureAtomics())
if (getPhysicalDevice()->useNativeTextureAtomics() && (_mtlPixelFormat == MTLPixelFormatR32Sint || _mtlPixelFormat == MTLPixelFormatR32Uint || _mtlPixelFormat == MTLPixelFormatRG32Uint))
usage |= MTLTextureUsageShaderAtomic;
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion MoltenVK/MoltenVK/GPUObjects/MVKPixelFormats.mm
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@
}

#if MVK_XCODE_15
if (supportAtomics) {
if (supportAtomics && (mtlFormat == MTLPixelFormatR32Uint || mtlFormat == MTLPixelFormatR32Sint || mtlFormat == MTLPixelFormatRG32Uint)) {
mvkEnableFlags(mtlUsage, MTLTextureUsageShaderAtomic);
}
#endif
Expand Down

0 comments on commit eadfee0

Please sign in to comment.