Skip to content

Commit

Permalink
[hgiMetal] Fixed texture resource storage mode
Browse files Browse the repository at this point in the history
Restored the earlier behavior of allocating textures
with MTLResourceStorageModePrivate. This is the preferred
mode for best performance and compatibility across different
Metal implementations.

This regression had been introduced inadvertently as part of
enabling imaging for Apple embedded systems.

Fixes PixarAnimationStudios#3470

(Internal change: 2352441)
  • Loading branch information
davidgyu authored and pixar-oss committed Dec 21, 2024
1 parent c281ea3 commit b787c84
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pxr/imaging/hgiMetal/texture.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
MTLResourceOptions resourceOptions = MTLResourceStorageModePrivate;
MTLTextureUsage usage = MTLTextureUsageShaderRead;

if (desc.initialData && desc.pixelsByteSize > 0) {
resourceOptions = hgi->GetCapabilities()->defaultStorageMode;
}

MTLPixelFormat mtlFormat = HgiMetalConversions::GetPixelFormat(
desc.format, desc.usage);

Expand Down

0 comments on commit b787c84

Please sign in to comment.