Metal 4 (validation / debug layer): residency set requirement mismatch for memoryless attachments

Setup: MSAA rendering using a memoryless texture as the color attachment (render_image) and a "normal" texture as the resolve attachment (resolve_image). MTL_DEBUG_LAYER / API validation is enabled for this.

When trying to add the memoryless texture to a residency set, I get the following error:

-[MTLDebugResidencySet validateResource:], line 114: error 'residency sets do not support memoryless resources.

Which is as expected and identical to Metal 3.

However, if I don't add it to the residency set, I then get the following error when committing to the command queue:

-[MTL4DebugCommandQueue commit:count:options:], line 67: error 'Commit With Options Validation
Attachment texture (Label: render_image) used in command buffer (at index 0) is not added to any residency set on the command buffer or command queue.

So which way around is actually correct in Metal 4? Either way, this makes the use of memoryless textures/attachments impossible right now when validation is enabled.

FWIW: when disabling all validation, either way seems to work just fine.

Tested on: M1 Max, macOS 26.3, Xcode 26.2 & 26.4b2

Metal 4 (validation / debug layer): residency set requirement mismatch for memoryless attachments
 
 
Q