yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
ae3e7730
main
1float PixelShaderFunctionS (float inF0 ,float inF1 ,float inF2 ,int inI0 ) 2{ 3// AllMemoryBarrier(); // TODO: expected error: invalid in fragment stage 4// AllMemoryBarrierWithGroupSync(); // TODO: expected error: invalid in fragment stage 5asdouble (inF0 ,inF1 );// expected error: only integer inputs 6CheckAccessFullyMapped (3.0 );// expected error: only valid on integers 7countbits (inF0 );// expected error: only integer inputs 8cross (inF0 ,inF1 );// expected error: only on float3 inputs 9D3DCOLORtoUBYTE4 (inF0 );// expected error: only on float4 inputs 10determinant (inF0 );// expected error: only valid on mats 11// DeviceMemoryBarrierWithGroupSync(); // TODO: expected error: only valid in compute stage 12f16tof32 (inF0 );// expected error: only integer inputs 13firstbithigh (inF0 );// expected error: only integer inputs 14firstbitlow (inF0 );// expected error: only integer inputs 15// fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC 16// InterlockedAdd(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator 17// InterlockedAnd(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out i // InterlockedMax(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator 18// InterlockedMin(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator 19// InterlockedOor(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator 20// InterlockedXor(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator 21// GroupMemoryBarrier(); // TODO: expected error: invalid in fragment stage 22// GroupMemoryBarrierWithGroupSync(); // TODO: expected error: invalid in fragment stage 23length (inF0 );// expected error: invalid on scalars 24msad4 (inF0 ,float2 (0 ),float4 (0 ));// expected error: only integer inputs 25normalize (inF0 );// expected error: invalid on scalars 26reflect (inF0 ,inF1 );// expected error: invalid on scalars 27refract (inF0 ,inF1 ,inF2 );// expected error: invalid on scalars 28refract (float2 (0 ),float2 (0 ),float2 (0 ));// expected error: last parameter only scalar 29reversebits (inF0 );// expected error: only integer inputs 30transpose (inF0 );// expected error: only valid on mats 31 32return 0.0 ; 33} 34 35float1 PixelShaderFunction1 (float1 inF0 ,float1 inF1 ,float1 inF2 ,int1 inI0 ) 36{ 37// TODO: ... add when float1 prototypes are generated 38 39GetRenderTargetSamplePosition (inF0 );// expected error: only integer inputs 40 41return 0.0 ; 42} 43 44float2 PixelShaderFunction2 (float2 inF0 ,float2 inF1 ,float2 inF2 ,int2 inI0 ) 45{ 46asdouble (inF0 ,inF1 );// expected error: only integer inputs 47CheckAccessFullyMapped (inF0 );// expected error: only valid on scalars 48countbits (inF0 );// expected error: only integer inputs 49cross (inF0 ,inF1 );// expected error: only on float3 inputs 50D3DCOLORtoUBYTE4 (inF0 );// expected error: only on float4 inputs 51determinant (inF0 );// expected error: only valid on mats 52f16tof32 (inF0 );// expected error: only integer inputs 53firstbithigh (inF0 );// expected error: only integer inputs 54firstbitlow (inF0 );// expected error: only integer inputs 55// fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC 56reversebits (inF0 );// expected error: only integer inputs 57transpose (inF0 );// expected error: only valid on mats 58 59return float2 (1 ,2 ); 60} 61 62float3 PixelShaderFunction3 (float3 inF0 ,float3 inF1 ,float3 inF2 ,int3 inI0 ) 63{ 64CheckAccessFullyMapped (inF0 );// expected error: only valid on scalars 65countbits (inF0 );// expected error: only integer inputs 66D3DCOLORtoUBYTE4 (inF0 );// expected error: only on float4 inputs 67determinant (inF0 );// expected error: only valid on mats 68f16tof32 (inF0 );// expected error: only integer inputs 69firstbithigh (inF0 );// expected error: only integer inputs 70firstbitlow (inF0 );// expected error: only integer inputs 71// fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC 72reversebits (inF0 );// expected error: only integer inputs 73transpose (inF0 );// expected error: only valid on mats 74 75 76return float3 (1 ,2 ,3 ); 77} 78 79float4 PixelShaderFunction (float4 inF0 ,float4 inF1 ,float4 inF2 ,int4 inI0 ) 80{ 81CheckAccessFullyMapped (inF0 );// expected error: only valid on scalars 82countbits (inF0 );// expected error: only integer inputs 83cross (inF0 ,inF1 );// expected error: only on float3 inputs 84determinant (inF0 );// expected error: only valid on mats 85f16tof32 (inF0 );// expected error: only integer inputs 86firstbithigh (inF0 );// expected error: only integer inputs 87firstbitlow (inF0 );// expected error: only integer inputs 88// fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC 89reversebits (inF0 );// expected error: only integer inputs 90transpose (inF0 );// expected error: only valid on mats 91 92return float4 (1 ,2 ,3 ,4 ); 93} 94 95// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without. 96#define MATFNS () \ 97 countbits(inF0); \ 98 D3DCOLORtoUBYTE4(inF0); \ 99 cross(inF0, inF1); \ 100 f16tof32(inF0); \ 101 firstbithigh(inF0); \ 102 firstbitlow(inF0); \ 103 reversebits(inF0); \ 104 length(inF0); \ 105 noise(inF0); \ 106 normalize(inF0); \ 107 reflect(inF0, inF1); \ 108 refract(inF0, inF1, 1.0); \ 109 reversebits(inF0); \ 110 111 112// TODO: turn on non-square matrix tests when protos are available. 113 114float2x2 PixelShaderFunction2x2 (float2x2 inF0 ,float2x2 inF1 ,float2x2 inF2 ) 115{ 116// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without. 117MATFNS () 118 119return float2x2 (2 ,2 ,2 ,2 ); 120} 121 122float3x3 PixelShaderFunction3x3 (float3x3 inF0 ,float3x3 inF1 ,float3x3 inF2 ) 123{ 124// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without. 125MATFNS () 126 127return float3x3 (3 ,3 ,3 ,3 ,3 ,3 ,3 ,3 ,3 ); 128} 129 130float4x4 PixelShaderFunction4x4 (float4x4 inF0 ,float4x4 inF1 ,float4x4 inF2 ) 131{ 132// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without. 133MATFNS () 134 135return float4x4 (4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ); 136}