 38cbad15ca
			
		
	
	
		38cbad15ca
		
	
	
	
	
		
			
			Last year we changed 'volatile' to also act as 'coherent', but when I resolved the memory model changes against that change I missed handling volatile in a couple places that we check for coherent. There was also a place in post-processing that acted as if the volatile memory access flag has a literal number associated with it, when it doesn't.
		
			
				
	
	
		
			26 lines
		
	
	
		
			431 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			431 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 450
 | |
| 
 | |
| #extension GL_ARB_gpu_shader_int64 : enable
 | |
| #extension GL_EXT_buffer_reference : enable
 | |
| 
 | |
| layout(buffer_reference, std430) buffer blockType {
 | |
|     uint x[];
 | |
| };
 | |
| 
 | |
| layout(std430) buffer t2 {
 | |
|     blockType f;
 | |
| } t;
 | |
| 
 | |
| layout(location = 0) flat in uint i;
 | |
| 
 | |
| void main() {
 | |
| 
 | |
|     atomicAdd(t.f.x[i], 1);
 | |
| 
 | |
|     coherent blockType b = t.f;
 | |
|     b.x[0] = 2;
 | |
| 
 | |
|     volatile blockType b2 = t.f;
 | |
|     b2.x[0] = 3;
 | |
| }
 |