Specifying texture storage mode

When creating a MTLTexture with MTLTextureDescriptor, there are two properties that seem to overlap: resourceOptions and storageMode. MTLResourceOptions includes .storageModeShared, .storageModePrivate, and .storageModeMemoryless (plus a few other options). MTLStorageMode includes .shared, .private, and .memoryless. Is there any difference between specifying the storage mode through the resourceOptions vs. the storageMode property? Or does setting one affect the other?


The same question applies to MTLResourceOptions.cpuCacheModeWriteCombined vs. MTLMTLCPUCacheMode.writeCombined.


I don't think this behavior is documented, so I'm just looking for official confirmation.


Thank you!

Replies

Yes, the flags are mirrored between the two properties: changing one will update the other.

So if I set different values to those two params respectly, which one works? ResourcOption,or storageMode?