Tile Shaders performance when writing to tile texture vs. resolve texture

I am working on a custom resolve tile shader for a client. I see a big difference in performance depending on where we write to:

1- the resolve texture of the color attachment

2- a rw tile shader texture set via [renderEncoder setTileTexture: myResolvedTexture]

Option 2 is more than twice as slow than option 1.

Our compute shader writes to 4 UAVs so just using the resolve texture entry is not possible.

Why such a difference as there is no more data being written? Can option 2 be as fast as option 1?

I can demonstrate the issue in a modified version of the Multisample code sample.

Answered by OctoBHVR in 824225022

Regarding this, an Apple Engineer in charge of our product reached out to me. He pointed out that writing to the UAV disables lossless compression and causes the slow down.

Thank you for taking the time to answer.

Hello,

Please demonstrate so we can discuss.

Sure! I created a feedback ticket and attached Code sample and Metal captures.

FB16427191

Thank you!

Accepted Answer

Regarding this, an Apple Engineer in charge of our product reached out to me. He pointed out that writing to the UAV disables lossless compression and causes the slow down.

Thank you for taking the time to answer.

Happy to hear that you've discovered the cause of the performance difference.

Tile Shaders performance when writing to tile texture vs. resolve texture
 
 
Q