Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Performance implications of using RWStructuredBuffer for reading

$
0
0
I have a compute shader which writes to an RWStructuredBuffer and later a pixel shader uses it as SRV for reading (StructuredBuffer). For this I put a barrier to transition the buffer to SRV and back to UAV after the pixel shader is done. I am trying to minimize number of barriers so one option is to just use RWStructuredBuffer even in the pixel shader even if the shader only reads from it. So my question is, does RWStructuredBuffer come with a hidden cost for reading which is greater than the cost of the two barriers?

Viewing all articles
Browse latest Browse all 17825

Trending Articles