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

Are XXXMemoryBarrierWithGroupSync essentially equivalent?

$
0
0

Hey Guys,

 

I come across this question when I need to sync all my threads in one threadgroup. And after looking related MSDN pages, I feel like both GroupMemoryBarrierWithGroupSync, DeviceMemoryBarrierWithGroupSync, AllMemoryBarrierWithGroupSync are equivalent. Although they target on different memory scope, but at the end, they all ensure that all threads in this thread group reached this exact call, which (to my understanding) should guarante all previous shader statements (including all memory accesses) are finished. I know XXXMemoryBarrier calls makes differences, but how XXXMemoryBarrierWithGroupSync makes any differences?

 

I feel I must missed some key parts when understanding how those sync function works, it will be great if someone could point it out.

 

Thanks


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>