yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
6d41bb9c
16.4.0
1 2 3groupshared uint gs_ua ; 4groupshared uint gs_ub ; 5groupshared uint gs_uc ; 6groupshared uint2 gs_ua2 ; 7groupshared uint2 gs_ub2 ; 8groupshared uint2 gs_uc2 ; 9groupshared uint3 gs_ua3 ; 10groupshared uint3 gs_ub3 ; 11groupshared uint3 gs_uc3 ; 12groupshared uint4 gs_ua4 ; 13groupshared uint4 gs_ub4 ; 14groupshared uint4 gs_uc4 ; 15groupshared float gs_fa ; 16groupshared float gs_fb ; 17 18float ComputeShaderFunctionS ( float inF0 , float inF1 , float inF2 , uint inU0 , uint inU1 ) 19{ 20uint out_u1 ; 21 22// Don't repeat all the pixel/vertex fns - just one for sanity. 23all ( inF0 ) ; 24 25// Test atomics 26InterlockedAdd ( gs_ua , gs_ub ) ; 27InterlockedAdd ( gs_ua , gs_ub , out_u1 ) ; 28InterlockedAnd ( gs_ua , gs_ub ) ; 29InterlockedAnd ( gs_ua , gs_ub , out_u1 ) ; 30InterlockedCompareExchange ( gs_ua , gs_ub , gs_uc , out_u1 ) ; 31InterlockedExchange ( gs_ua , gs_ub , out_u1 ) ; 32InterlockedMax ( gs_ua , gs_ub ) ; 33InterlockedMax ( gs_ua , gs_ub , out_u1 ) ; 34InterlockedMin ( gs_ua , gs_ub ) ; 35InterlockedMin ( gs_ua , gs_ub , out_u1 ) ; 36InterlockedOr ( gs_ua , gs_ub ) ; 37InterlockedOr ( gs_ua , gs_ub , out_u1 ) ; 38InterlockedXor ( gs_ua , gs_ub ) ; 39InterlockedXor ( gs_ua , gs_ub , out_u1 ) ; 40 41InterlockedAdd ( gs_fa , gs_fb ) ; 42 43// CheckAccessFullyMapped(3); // TODO: ... 44 45return 0.0 ; 46} 47 48float1 ComputeShaderFunction1 ( float1 inF0 , float1 inF1 , float1 inF2 ) 49{ 50// TODO: ... add when float1 prototypes are generated 51return 0.0 ; 52} 53 54float2 ComputeShaderFunction2 ( float2 inF0 , float2 inF1 , float2 inF2 , uint2 inU0 , uint2 inU1 ) 55{ 56uint2 out_u2 ; 57 58// Don't repeat all the pixel/vertex fns - just one for sanity. 59all ( inF0 ) ; 60 61// Test atomics 62InterlockedAdd ( gs_ua2 , gs_ub2 ) ; 63InterlockedAdd ( gs_ua2 , gs_ub2 , out_u2 ) ; 64InterlockedAnd ( gs_ua2 , gs_ub2 ) ; 65InterlockedAnd ( gs_ua2 , gs_ub2 , out_u2 ) ; 66InterlockedCompareExchange ( gs_ua2 , gs_ub2 , gs_uc2 , out_u2 ) ; 67InterlockedExchange ( gs_ua2 , gs_ub2 , out_u2 ) ; 68InterlockedMax ( gs_ua2 , gs_ub2 ) ; 69InterlockedMax ( gs_ua2 , gs_ub2 , out_u2 ) ; 70InterlockedMin ( gs_ua2 , gs_ub2 ) ; 71InterlockedMin ( gs_ua2 , gs_ub2 , out_u2 ) ; 72InterlockedOr ( gs_ua2 , gs_ub2 ) ; 73InterlockedOr ( gs_ua2 , gs_ub2 , out_u2 ) ; 74InterlockedXor ( gs_ua2 , gs_ub2 ) ; 75InterlockedXor ( gs_ua2 , gs_ub2 , out_u2 ) ; 76 77// TODO: ... add when float1 prototypes are generated 78return float2 ( 1 , 2 ) ; 79} 80 81float3 ComputeShaderFunction3 ( float3 inF0 , float3 inF1 , float3 inF2 , uint3 inU0 , uint3 inU1 ) 82{ 83uint3 out_u3 ; 84 85// Don't repeat all the pixel/vertex fns - just one for sanity. 86all ( inF0 ) ; 87 88// Test atomics 89InterlockedAdd ( gs_ua3 , gs_ub3 ) ; 90InterlockedAdd ( gs_ua3 , gs_ub3 , out_u3 ) ; 91InterlockedAnd ( gs_ua3 , gs_ub3 ) ; 92InterlockedAnd ( gs_ua3 , gs_ub3 , out_u3 ) ; 93InterlockedCompareExchange ( gs_ua3 , gs_ub3 , gs_uc3 , out_u3 ) ; 94InterlockedExchange ( gs_ua3 , gs_ub3 , out_u3 ) ; 95InterlockedMax ( gs_ua3 , gs_ub3 ) ; 96InterlockedMax ( gs_ua3 , gs_ub3 , out_u3 ) ; 97InterlockedMin ( gs_ua3 , gs_ub3 ) ; 98InterlockedMin ( gs_ua3 , gs_ub3 , out_u3 ) ; 99InterlockedOr ( gs_ua3 , gs_ub3 ) ; 100InterlockedOr ( gs_ua3 , gs_ub3 , out_u3 ) ; 101InterlockedXor ( gs_ua3 , gs_ub3 ) ; 102InterlockedXor ( gs_ua3 , gs_ub3 , out_u3 ) ; 103 104// TODO: ... add when float1 prototypes are generated 105return float3 ( 1 , 2 , 3 ) ; 106} 107 108float4 ComputeShaderFunction ( float4 inF0 , float4 inF1 , float4 inF2 , uint4 inU0 , uint4 inU1 ) 109{ 110uint4 out_u4 ; 111 112// Don't repeat all the pixel/vertex fns - just one for sanity. 113all ( inF0 ) ; 114 115// Test atomics 116InterlockedAdd ( gs_ua4 , gs_ub4 ) ; 117InterlockedAdd ( gs_ua4 , gs_ub4 , out_u4 ) ; 118InterlockedAnd ( gs_ua4 , gs_ub4 ) ; 119InterlockedAnd ( gs_ua4 , gs_ub4 , out_u4 ) ; 120InterlockedCompareExchange ( gs_ua4 , gs_ub4 , gs_uc4 , out_u4 ) ; 121InterlockedExchange ( gs_ua4 , gs_ub4 , out_u4 ) ; 122InterlockedMax ( gs_ua4 , gs_ub4 ) ; 123InterlockedMax ( gs_ua4 , gs_ub4 , out_u4 ) ; 124InterlockedMin ( gs_ua4 , gs_ub4 ) ; 125InterlockedMin ( gs_ua4 , gs_ub4 , out_u4 ) ; 126InterlockedOr ( gs_ua4 , gs_ub4 ) ; 127InterlockedOr ( gs_ua4 , gs_ub4 , out_u4 ) ; 128InterlockedXor ( gs_ua4 , gs_ub4 ) ; 129InterlockedXor ( gs_ua4 , gs_ub4 , out_u4 ) ; 130 131// TODO: ... add when float1 prototypes are generated 132return float4 ( 1 , 2 , 3 , 4 ) ; 133}