hanyangl5 / horizon

precompute atmospheric scattering
MIT License
7 stars 1 forks source link

provide barrier interface #51

Closed hanyangl5 closed 2 years ago

hanyangl5 commented 2 years ago

All of the GPU commands sent to a VkQueue will start in order, but will not end in order. The GPU is free to schedule and reorganize the commands in whatever way it sees fit. This means that if we run a shader like above, and then try to do some rendering that uses said matrix buffer, it’s possible that the compute shader hasnt finished executing before the buffer is used, thus doing a data race and likely causing bad things to happen.

barrier also used in transition image layout and queue family ownership transfer

hanyangl5 commented 2 years ago

done in https://github.com/v4vendeta/horizon/commit/2025efb78dd5b0581541b9782237ae74bab520df