Read uniform buffer from ray gen shader with info filled from a compute shader


I’m experiencing issues in a ray generation shader when reading from a uniform buffer with information I fill in a compute shader. The contents are always 0 (it is a buffer where I store a few thousands of “uint” values).

I have tried with buffer memory barriers to make the writes from the compute shader visible to the ray tracing shader, and also with a memory barrier for shader write to shader reads between the compute and the ray tracing stages, but the values are still not updated.

I have an RTX 2060 and drivers v471.11.

Am I missing any restrictions or additional barriers here?

Best regards,