diff --git a/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag b/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag index 6280f7e2..25eee2d9 100644 --- a/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag @@ -1,7 +1,7 @@ cbuffer _5 : register(b0) { - column_major float2x4 _4_m0 : packoffset(c0); - float4 _4_m1 : packoffset(c4); + column_major float2x4 _5_m0 : packoffset(c0); + float4 _5_m1 : packoffset(c4); }; static float2 _3; @@ -13,7 +13,7 @@ struct SPIRV_Cross_Output void frag_main() { - _3 = mul(_4_m0, _4_m1); + _3 = mul(_5_m0, _5_m1); } SPIRV_Cross_Output main() diff --git a/reference/opt/shaders-hlsl/comp/rwbuffer-matrix.comp b/reference/opt/shaders-hlsl/comp/rwbuffer-matrix.comp index 31b8769f..c05f8ffb 100644 --- a/reference/opt/shaders-hlsl/comp/rwbuffer-matrix.comp +++ b/reference/opt/shaders-hlsl/comp/rwbuffer-matrix.comp @@ -1,8 +1,8 @@ RWByteAddressBuffer _28 : register(u0); cbuffer _68 : register(b1) { - int UBO_index0 : packoffset(c0); - int UBO_index1 : packoffset(c0.y); + int _68_index0 : packoffset(c0); + int _68_index1 : packoffset(c0.y); }; void comp_main() @@ -58,29 +58,29 @@ void comp_main() _28.Store(256, asuint(_274[0].y)); _28.Store(260, asuint(_274[1].y)); _28.Store(264, asuint(_274[2].y)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 16 + 64, asuint(1.0f)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 8 + 144, asuint(2.0f)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 8 + 192, asuint(3.0f)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 16 + 240, asuint(4.0f)); - _28.Store(UBO_index0 * 4 + 64, asuint(1.0f.x)); - _28.Store(UBO_index0 * 4 + 80, asuint(1.0f.xxxx.y)); - _28.Store(UBO_index0 * 4 + 96, asuint(1.0f.xxxx.z)); - _28.Store(UBO_index0 * 4 + 112, asuint(1.0f.xxxx.w)); - _28.Store(UBO_index0 * 4 + 144, asuint(2.0f.x)); - _28.Store(UBO_index0 * 4 + 152, asuint(2.0f.xx.y)); - _28.Store(UBO_index0 * 4 + 192, asuint(3.0f.x)); - _28.Store(UBO_index0 * 4 + 200, asuint(3.0f.xxx.y)); - _28.Store(UBO_index0 * 4 + 208, asuint(3.0f.xxx.z)); - _28.Store(UBO_index0 * 4 + 240, asuint(4.0f.x)); - _28.Store(UBO_index0 * 4 + 256, asuint(4.0f.xx.y)); - _28.Store(UBO_index0 * 16 + UBO_index1 * 4 + 0, asuint(1.0f)); - _28.Store(UBO_index0 * 8 + UBO_index1 * 4 + 128, asuint(2.0f)); - _28.Store(UBO_index0 * 16 + UBO_index1 * 4 + 160, asuint(3.0f)); - _28.Store(UBO_index0 * 8 + UBO_index1 * 4 + 216, asuint(4.0f)); - _28.Store4(UBO_index0 * 16 + 0, asuint(1.0f.xxxx)); - _28.Store2(UBO_index0 * 8 + 128, asuint(2.0f.xx)); - _28.Store3(UBO_index0 * 16 + 160, asuint(3.0f.xxx)); - _28.Store2(UBO_index0 * 8 + 216, asuint(4.0f.xx)); + _28.Store(_68_index0 * 4 + _68_index1 * 16 + 64, asuint(1.0f)); + _28.Store(_68_index0 * 4 + _68_index1 * 8 + 144, asuint(2.0f)); + _28.Store(_68_index0 * 4 + _68_index1 * 8 + 192, asuint(3.0f)); + _28.Store(_68_index0 * 4 + _68_index1 * 16 + 240, asuint(4.0f)); + _28.Store(_68_index0 * 4 + 64, asuint(1.0f.x)); + _28.Store(_68_index0 * 4 + 80, asuint(1.0f.xxxx.y)); + _28.Store(_68_index0 * 4 + 96, asuint(1.0f.xxxx.z)); + _28.Store(_68_index0 * 4 + 112, asuint(1.0f.xxxx.w)); + _28.Store(_68_index0 * 4 + 144, asuint(2.0f.x)); + _28.Store(_68_index0 * 4 + 152, asuint(2.0f.xx.y)); + _28.Store(_68_index0 * 4 + 192, asuint(3.0f.x)); + _28.Store(_68_index0 * 4 + 200, asuint(3.0f.xxx.y)); + _28.Store(_68_index0 * 4 + 208, asuint(3.0f.xxx.z)); + _28.Store(_68_index0 * 4 + 240, asuint(4.0f.x)); + _28.Store(_68_index0 * 4 + 256, asuint(4.0f.xx.y)); + _28.Store(_68_index0 * 16 + _68_index1 * 4 + 0, asuint(1.0f)); + _28.Store(_68_index0 * 8 + _68_index1 * 4 + 128, asuint(2.0f)); + _28.Store(_68_index0 * 16 + _68_index1 * 4 + 160, asuint(3.0f)); + _28.Store(_68_index0 * 8 + _68_index1 * 4 + 216, asuint(4.0f)); + _28.Store4(_68_index0 * 16 + 0, asuint(1.0f.xxxx)); + _28.Store2(_68_index0 * 8 + 128, asuint(2.0f.xx)); + _28.Store3(_68_index0 * 16 + 160, asuint(3.0f.xxx)); + _28.Store2(_68_index0 * 8 + 216, asuint(4.0f.xx)); } [numthreads(1, 1, 1)] diff --git a/reference/opt/shaders-hlsl/comp/shared.comp b/reference/opt/shaders-hlsl/comp/shared.comp index 498241ea..c34ade10 100644 --- a/reference/opt/shaders-hlsl/comp/shared.comp +++ b/reference/opt/shaders-hlsl/comp/shared.comp @@ -16,7 +16,7 @@ groupshared float sShared[4]; void comp_main() { sShared[gl_LocalInvocationIndex] = asfloat(_22.Load(gl_GlobalInvocationID.x * 4 + 0)); - GroupMemoryBarrierWithGroupSync(); + DeviceMemoryBarrierWithGroupSync(); _44.Store(gl_GlobalInvocationID.x * 4 + 0, asuint(sShared[(4u - gl_LocalInvocationIndex) - 1u])); } diff --git a/reference/opt/shaders-hlsl/frag/constant-buffer-array.sm51.frag b/reference/opt/shaders-hlsl/frag/constant-buffer-array.sm51.frag index 5f476962..7e613da1 100644 --- a/reference/opt/shaders-hlsl/frag/constant-buffer-array.sm51.frag +++ b/reference/opt/shaders-hlsl/frag/constant-buffer-array.sm51.frag @@ -9,10 +9,10 @@ struct CBO_1 ConstantBuffer cbo[2][4] : register(b4, space0); cbuffer push { - float4 PushMe_a : packoffset(c0); - float4 PushMe_b : packoffset(c1); - float4 PushMe_c : packoffset(c2); - float4 PushMe_d : packoffset(c3); + float4 push_a : packoffset(c0); + float4 push_b : packoffset(c1); + float4 push_c : packoffset(c2); + float4 push_d : packoffset(c3); }; static float4 FragColor; @@ -28,10 +28,10 @@ void frag_main() FragColor += cbo[1][2].b; FragColor += cbo[1][2].c; FragColor += cbo[1][2].d; - FragColor += PushMe_a; - FragColor += PushMe_b; - FragColor += PushMe_c; - FragColor += PushMe_d; + FragColor += push_a; + FragColor += push_b; + FragColor += push_c; + FragColor += push_d; } SPIRV_Cross_Output main() diff --git a/reference/opt/shaders-hlsl/frag/resources.frag b/reference/opt/shaders-hlsl/frag/resources.frag index b89e4626..24b93c23 100644 --- a/reference/opt/shaders-hlsl/frag/resources.frag +++ b/reference/opt/shaders-hlsl/frag/resources.frag @@ -1,10 +1,10 @@ cbuffer cbuf : register(b3) { - float4 CBuffer_a : packoffset(c0); + float4 cbuf_a : packoffset(c0); }; cbuffer registers { - float4 PushMe_d : packoffset(c0); + float4 registers_d : packoffset(c0); }; Texture2D uSampledImage : register(t4); SamplerState _uSampledImage_sampler : register(s4); @@ -26,7 +26,7 @@ struct SPIRV_Cross_Output void frag_main() { - FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (CBuffer_a + PushMe_d); + FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_d); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/opt/shaders-hlsl/vert/basic.vert b/reference/opt/shaders-hlsl/vert/basic.vert index 61aa8a55..5f0a5f3d 100644 --- a/reference/opt/shaders-hlsl/vert/basic.vert +++ b/reference/opt/shaders-hlsl/vert/basic.vert @@ -1,6 +1,6 @@ cbuffer _16 { - row_major float4x4 UBO_uMVP : packoffset(c0); + row_major float4x4 _16_uMVP : packoffset(c0); }; static float4 gl_Position; @@ -22,7 +22,7 @@ struct SPIRV_Cross_Output void vert_main() { - gl_Position = mul(aVertex, UBO_uMVP); + gl_Position = mul(aVertex, _16_uMVP); vNormal = aNormal; } diff --git a/reference/opt/shaders/comp/shared.comp b/reference/opt/shaders/comp/shared.comp index 66ec1c2c..e0bc0554 100644 --- a/reference/opt/shaders/comp/shared.comp +++ b/reference/opt/shaders/comp/shared.comp @@ -16,7 +16,8 @@ shared float sShared[4]; void main() { sShared[gl_LocalInvocationIndex] = _22.in_data[gl_GlobalInvocationID.x]; - memoryBarrierShared(); + memoryBarrier(); + memoryBarrier(); barrier(); _44.out_data[gl_GlobalInvocationID.x] = sShared[(4u - gl_LocalInvocationIndex) - 1u]; } diff --git a/reference/opt/shaders/legacy/fragment/io-blocks.legacy.frag b/reference/opt/shaders/legacy/fragment/io-blocks.legacy.frag index abcf750a..d5a60d53 100644 --- a/reference/opt/shaders/legacy/fragment/io-blocks.legacy.frag +++ b/reference/opt/shaders/legacy/fragment/io-blocks.legacy.frag @@ -2,11 +2,11 @@ precision mediump float; precision highp int; -varying vec4 VertexOut_color; -varying highp vec3 VertexOut_normal; +varying vec4 vin_color; +varying highp vec3 vin_normal; void main() { - gl_FragData[0] = VertexOut_color + VertexOut_normal.xyzz; + gl_FragData[0] = vin_color + vin_normal.xyzz; } diff --git a/reference/opt/shaders/legacy/fragment/struct-varying.legacy.frag b/reference/opt/shaders/legacy/fragment/struct-varying.legacy.frag index 6118b99e..e131f2e2 100644 --- a/reference/opt/shaders/legacy/fragment/struct-varying.legacy.frag +++ b/reference/opt/shaders/legacy/fragment/struct-varying.legacy.frag @@ -8,11 +8,11 @@ struct Inputs highp vec2 b; }; -varying highp vec4 Inputs_a; -varying highp vec2 Inputs_b; +varying highp vec4 vin_a; +varying highp vec2 vin_b; void main() { - gl_FragData[0] = ((((Inputs(Inputs_a, Inputs_b).a + Inputs(Inputs_a, Inputs_b).b.xxyy) + Inputs(Inputs_a, Inputs_b).a) + Inputs(Inputs_a, Inputs_b).b.yyxx) + Inputs_a) + Inputs_b.xxyy; + gl_FragData[0] = ((((Inputs(vin_a, vin_b).a + Inputs(vin_a, vin_b).b.xxyy) + Inputs(vin_a, vin_b).a) + Inputs(vin_a, vin_b).b.yyxx) + vin_a) + vin_b.xxyy; } diff --git a/reference/opt/shaders/legacy/vert/io-block.legacy.vert b/reference/opt/shaders/legacy/vert/io-block.legacy.vert index b6312369..3c518dc7 100644 --- a/reference/opt/shaders/legacy/vert/io-block.legacy.vert +++ b/reference/opt/shaders/legacy/vert/io-block.legacy.vert @@ -1,13 +1,13 @@ #version 100 attribute vec4 Position; -varying vec4 VertexOut_color; -varying vec3 VertexOut_normal; +varying vec4 vout_color; +varying vec3 vout_normal; void main() { gl_Position = Position; - VertexOut_color = vec4(1.0); - VertexOut_normal = vec3(0.5); + vout_color = vec4(1.0); + vout_normal = vec3(0.5); } diff --git a/reference/opt/shaders/legacy/vert/struct-varying.legacy.vert b/reference/opt/shaders/legacy/vert/struct-varying.legacy.vert index cebd65f7..8520e2d5 100644 --- a/reference/opt/shaders/legacy/vert/struct-varying.legacy.vert +++ b/reference/opt/shaders/legacy/vert/struct-varying.legacy.vert @@ -6,25 +6,25 @@ struct Output vec2 b; }; -varying vec4 Output_a; -varying vec2 Output_b; +varying vec4 vout_a; +varying vec2 vout_b; void main() { { Output vout = Output(vec4(0.5), vec2(0.25)); - Output_a = vout.a; - Output_b = vout.b; + vout_a = vout.a; + vout_b = vout.b; } { Output vout = Output(vec4(0.5), vec2(0.25)); - Output_a = vout.a; - Output_b = vout.b; + vout_a = vout.a; + vout_b = vout.b; } - Output _22 = Output(Output_a, Output_b); - Output_a = _22.a; - Output_b = _22.b; - Output_a.x = 1.0; - Output_b.y = 1.0; + Output _22 = Output(vout_a, vout_b); + vout_a = _22.a; + vout_b = _22.b; + vout_a.x = 1.0; + vout_b.y = 1.0; } diff --git a/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag b/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag index e097ab20..851dfa1a 100644 --- a/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag +++ b/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag @@ -1,7 +1,7 @@ cbuffer _5 : register(b0) { - column_major float2x4 _4_m0 : packoffset(c0); - float4 _4_m1 : packoffset(c4); + column_major float2x4 _5_m0 : packoffset(c0); + float4 _5_m1 : packoffset(c4); }; static float2 _3; @@ -13,7 +13,7 @@ struct SPIRV_Cross_Output float2 _23() { - float2 _25 = mul(_4_m0, _4_m1); + float2 _25 = mul(_5_m0, _5_m1); return _25; } diff --git a/reference/shaders-hlsl/comp/rwbuffer-matrix.comp b/reference/shaders-hlsl/comp/rwbuffer-matrix.comp index fb5a5d4e..0e352f1f 100644 --- a/reference/shaders-hlsl/comp/rwbuffer-matrix.comp +++ b/reference/shaders-hlsl/comp/rwbuffer-matrix.comp @@ -1,8 +1,8 @@ RWByteAddressBuffer _28 : register(u0); cbuffer _68 : register(b1) { - int UBO_index0 : packoffset(c0); - int UBO_index1 : packoffset(c0.y); + int _68_index0 : packoffset(c0); + int _68_index1 : packoffset(c0.y); }; void row_to_col() @@ -66,57 +66,57 @@ void col_to_row() void write_dynamic_index_row() { - _28.Store(UBO_index0 * 4 + UBO_index1 * 16 + 64, asuint(1.0f)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 8 + 144, asuint(2.0f)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 8 + 192, asuint(3.0f)); - _28.Store(UBO_index0 * 4 + UBO_index1 * 16 + 240, asuint(4.0f)); - _28.Store(UBO_index0 * 4 + 64, asuint(1.0f.x)); - _28.Store(UBO_index0 * 4 + 80, asuint(1.0f.xxxx.y)); - _28.Store(UBO_index0 * 4 + 96, asuint(1.0f.xxxx.z)); - _28.Store(UBO_index0 * 4 + 112, asuint(1.0f.xxxx.w)); - _28.Store(UBO_index0 * 4 + 144, asuint(2.0f.x)); - _28.Store(UBO_index0 * 4 + 152, asuint(2.0f.xx.y)); - _28.Store(UBO_index0 * 4 + 192, asuint(3.0f.x)); - _28.Store(UBO_index0 * 4 + 200, asuint(3.0f.xxx.y)); - _28.Store(UBO_index0 * 4 + 208, asuint(3.0f.xxx.z)); - _28.Store(UBO_index0 * 4 + 240, asuint(4.0f.x)); - _28.Store(UBO_index0 * 4 + 256, asuint(4.0f.xx.y)); + _28.Store(_68_index0 * 4 + _68_index1 * 16 + 64, asuint(1.0f)); + _28.Store(_68_index0 * 4 + _68_index1 * 8 + 144, asuint(2.0f)); + _28.Store(_68_index0 * 4 + _68_index1 * 8 + 192, asuint(3.0f)); + _28.Store(_68_index0 * 4 + _68_index1 * 16 + 240, asuint(4.0f)); + _28.Store(_68_index0 * 4 + 64, asuint(1.0f.x)); + _28.Store(_68_index0 * 4 + 80, asuint(1.0f.xxxx.y)); + _28.Store(_68_index0 * 4 + 96, asuint(1.0f.xxxx.z)); + _28.Store(_68_index0 * 4 + 112, asuint(1.0f.xxxx.w)); + _28.Store(_68_index0 * 4 + 144, asuint(2.0f.x)); + _28.Store(_68_index0 * 4 + 152, asuint(2.0f.xx.y)); + _28.Store(_68_index0 * 4 + 192, asuint(3.0f.x)); + _28.Store(_68_index0 * 4 + 200, asuint(3.0f.xxx.y)); + _28.Store(_68_index0 * 4 + 208, asuint(3.0f.xxx.z)); + _28.Store(_68_index0 * 4 + 240, asuint(4.0f.x)); + _28.Store(_68_index0 * 4 + 256, asuint(4.0f.xx.y)); } void write_dynamic_index_col() { - _28.Store(UBO_index0 * 16 + UBO_index1 * 4 + 0, asuint(1.0f)); - _28.Store(UBO_index0 * 8 + UBO_index1 * 4 + 128, asuint(2.0f)); - _28.Store(UBO_index0 * 16 + UBO_index1 * 4 + 160, asuint(3.0f)); - _28.Store(UBO_index0 * 8 + UBO_index1 * 4 + 216, asuint(4.0f)); - _28.Store4(UBO_index0 * 16 + 0, asuint(1.0f.xxxx)); - _28.Store2(UBO_index0 * 8 + 128, asuint(2.0f.xx)); - _28.Store3(UBO_index0 * 16 + 160, asuint(3.0f.xxx)); - _28.Store2(UBO_index0 * 8 + 216, asuint(4.0f.xx)); + _28.Store(_68_index0 * 16 + _68_index1 * 4 + 0, asuint(1.0f)); + _28.Store(_68_index0 * 8 + _68_index1 * 4 + 128, asuint(2.0f)); + _28.Store(_68_index0 * 16 + _68_index1 * 4 + 160, asuint(3.0f)); + _28.Store(_68_index0 * 8 + _68_index1 * 4 + 216, asuint(4.0f)); + _28.Store4(_68_index0 * 16 + 0, asuint(1.0f.xxxx)); + _28.Store2(_68_index0 * 8 + 128, asuint(2.0f.xx)); + _28.Store3(_68_index0 * 16 + 160, asuint(3.0f.xxx)); + _28.Store2(_68_index0 * 8 + 216, asuint(4.0f.xx)); } void read_dynamic_index_row() { - float a0 = asfloat(_28.Load(UBO_index0 * 4 + UBO_index1 * 16 + 64)); - float a1 = asfloat(_28.Load(UBO_index0 * 4 + UBO_index1 * 8 + 144)); - float a2 = asfloat(_28.Load(UBO_index0 * 4 + UBO_index1 * 8 + 192)); - float a3 = asfloat(_28.Load(UBO_index0 * 4 + UBO_index1 * 16 + 240)); - float4 v0 = asfloat(uint4(_28.Load(UBO_index0 * 4 + 64), _28.Load(UBO_index0 * 4 + 80), _28.Load(UBO_index0 * 4 + 96), _28.Load(UBO_index0 * 4 + 112))); - float2 v1 = asfloat(uint2(_28.Load(UBO_index0 * 4 + 144), _28.Load(UBO_index0 * 4 + 152))); - float3 v2 = asfloat(uint3(_28.Load(UBO_index0 * 4 + 192), _28.Load(UBO_index0 * 4 + 200), _28.Load(UBO_index0 * 4 + 208))); - float2 v3 = asfloat(uint2(_28.Load(UBO_index0 * 4 + 240), _28.Load(UBO_index0 * 4 + 256))); + float a0 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 16 + 64)); + float a1 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 8 + 144)); + float a2 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 8 + 192)); + float a3 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 16 + 240)); + float4 v0 = asfloat(uint4(_28.Load(_68_index0 * 4 + 64), _28.Load(_68_index0 * 4 + 80), _28.Load(_68_index0 * 4 + 96), _28.Load(_68_index0 * 4 + 112))); + float2 v1 = asfloat(uint2(_28.Load(_68_index0 * 4 + 144), _28.Load(_68_index0 * 4 + 152))); + float3 v2 = asfloat(uint3(_28.Load(_68_index0 * 4 + 192), _28.Load(_68_index0 * 4 + 200), _28.Load(_68_index0 * 4 + 208))); + float2 v3 = asfloat(uint2(_28.Load(_68_index0 * 4 + 240), _28.Load(_68_index0 * 4 + 256))); } void read_dynamic_index_col() { - float a0 = asfloat(_28.Load(UBO_index0 * 16 + UBO_index1 * 4 + 0)); - float a1 = asfloat(_28.Load(UBO_index0 * 8 + UBO_index1 * 4 + 128)); - float a2 = asfloat(_28.Load(UBO_index0 * 16 + UBO_index1 * 4 + 160)); - float a3 = asfloat(_28.Load(UBO_index0 * 8 + UBO_index1 * 4 + 216)); - float4 v0 = asfloat(_28.Load4(UBO_index0 * 16 + 0)); - float2 v1 = asfloat(_28.Load2(UBO_index0 * 8 + 128)); - float3 v2 = asfloat(_28.Load3(UBO_index0 * 16 + 160)); - float2 v3 = asfloat(_28.Load2(UBO_index0 * 8 + 216)); + float a0 = asfloat(_28.Load(_68_index0 * 16 + _68_index1 * 4 + 0)); + float a1 = asfloat(_28.Load(_68_index0 * 8 + _68_index1 * 4 + 128)); + float a2 = asfloat(_28.Load(_68_index0 * 16 + _68_index1 * 4 + 160)); + float a3 = asfloat(_28.Load(_68_index0 * 8 + _68_index1 * 4 + 216)); + float4 v0 = asfloat(_28.Load4(_68_index0 * 16 + 0)); + float2 v1 = asfloat(_28.Load2(_68_index0 * 8 + 128)); + float3 v2 = asfloat(_28.Load3(_68_index0 * 16 + 160)); + float2 v3 = asfloat(_28.Load2(_68_index0 * 8 + 216)); } void comp_main() diff --git a/reference/shaders-hlsl/comp/shared.comp b/reference/shaders-hlsl/comp/shared.comp index 5d129003..97a9054c 100644 --- a/reference/shaders-hlsl/comp/shared.comp +++ b/reference/shaders-hlsl/comp/shared.comp @@ -18,7 +18,7 @@ void comp_main() uint ident = gl_GlobalInvocationID.x; float idata = asfloat(_22.Load(ident * 4 + 0)); sShared[gl_LocalInvocationIndex] = idata; - GroupMemoryBarrierWithGroupSync(); + DeviceMemoryBarrierWithGroupSync(); _44.Store(ident * 4 + 0, asuint(sShared[(4u - gl_LocalInvocationIndex) - 1u])); } diff --git a/reference/shaders-hlsl/frag/constant-buffer-array.sm51.frag b/reference/shaders-hlsl/frag/constant-buffer-array.sm51.frag index 5f476962..7e613da1 100644 --- a/reference/shaders-hlsl/frag/constant-buffer-array.sm51.frag +++ b/reference/shaders-hlsl/frag/constant-buffer-array.sm51.frag @@ -9,10 +9,10 @@ struct CBO_1 ConstantBuffer cbo[2][4] : register(b4, space0); cbuffer push { - float4 PushMe_a : packoffset(c0); - float4 PushMe_b : packoffset(c1); - float4 PushMe_c : packoffset(c2); - float4 PushMe_d : packoffset(c3); + float4 push_a : packoffset(c0); + float4 push_b : packoffset(c1); + float4 push_c : packoffset(c2); + float4 push_d : packoffset(c3); }; static float4 FragColor; @@ -28,10 +28,10 @@ void frag_main() FragColor += cbo[1][2].b; FragColor += cbo[1][2].c; FragColor += cbo[1][2].d; - FragColor += PushMe_a; - FragColor += PushMe_b; - FragColor += PushMe_c; - FragColor += PushMe_d; + FragColor += push_a; + FragColor += push_b; + FragColor += push_c; + FragColor += push_d; } SPIRV_Cross_Output main() diff --git a/reference/shaders-hlsl/frag/partial-write-preserve.frag b/reference/shaders-hlsl/frag/partial-write-preserve.frag index a3c7ce1f..4ed4d427 100644 --- a/reference/shaders-hlsl/frag/partial-write-preserve.frag +++ b/reference/shaders-hlsl/frag/partial-write-preserve.frag @@ -6,7 +6,7 @@ struct B cbuffer _42 : register(b0) { - int UBO_some_value : packoffset(c0); + int _42_some_value : packoffset(c0); }; void partial_inout(inout float4 x) @@ -22,7 +22,7 @@ void complete_inout(out float4 x) void branchy_inout(inout float4 v) { v.y = 20.0f; - if (UBO_some_value == 20) + if (_42_some_value == 20) { v = 50.0f.xxxx; } @@ -30,7 +30,7 @@ void branchy_inout(inout float4 v) void branchy_inout_2(out float4 v) { - if (UBO_some_value == 20) + if (_42_some_value == 20) { v = 50.0f.xxxx; } diff --git a/reference/shaders-hlsl/frag/resources.frag b/reference/shaders-hlsl/frag/resources.frag index 12237101..60b709e6 100644 --- a/reference/shaders-hlsl/frag/resources.frag +++ b/reference/shaders-hlsl/frag/resources.frag @@ -1,10 +1,10 @@ cbuffer cbuf : register(b3) { - float4 CBuffer_a : packoffset(c0); + float4 cbuf_a : packoffset(c0); }; cbuffer registers { - float4 PushMe_d : packoffset(c0); + float4 registers_d : packoffset(c0); }; Texture2D uSampledImage : register(t4); SamplerState _uSampledImage_sampler : register(s4); @@ -28,7 +28,7 @@ void frag_main() { float4 c0 = uSampledImage.Sample(_uSampledImage_sampler, vTex); float4 c1 = uTexture.Sample(uSampler, vTex); - float4 c2 = CBuffer_a + PushMe_d; + float4 c2 = cbuf_a + registers_d; FragColor = (c0 + c1) + c2; } diff --git a/reference/shaders-hlsl/vert/basic.vert b/reference/shaders-hlsl/vert/basic.vert index 61aa8a55..5f0a5f3d 100644 --- a/reference/shaders-hlsl/vert/basic.vert +++ b/reference/shaders-hlsl/vert/basic.vert @@ -1,6 +1,6 @@ cbuffer _16 { - row_major float4x4 UBO_uMVP : packoffset(c0); + row_major float4x4 _16_uMVP : packoffset(c0); }; static float4 gl_Position; @@ -22,7 +22,7 @@ struct SPIRV_Cross_Output void vert_main() { - gl_Position = mul(aVertex, UBO_uMVP); + gl_Position = mul(aVertex, _16_uMVP); vNormal = aNormal; } diff --git a/reference/shaders/comp/shared.comp b/reference/shaders/comp/shared.comp index d0987a65..08215c4f 100644 --- a/reference/shaders/comp/shared.comp +++ b/reference/shaders/comp/shared.comp @@ -18,7 +18,8 @@ void main() uint ident = gl_GlobalInvocationID.x; float idata = _22.in_data[ident]; sShared[gl_LocalInvocationIndex] = idata; - memoryBarrierShared(); + memoryBarrier(); + memoryBarrier(); barrier(); _44.out_data[ident] = sShared[(4u - gl_LocalInvocationIndex) - 1u]; } diff --git a/reference/shaders/legacy/fragment/io-blocks.legacy.frag b/reference/shaders/legacy/fragment/io-blocks.legacy.frag index abcf750a..d5a60d53 100644 --- a/reference/shaders/legacy/fragment/io-blocks.legacy.frag +++ b/reference/shaders/legacy/fragment/io-blocks.legacy.frag @@ -2,11 +2,11 @@ precision mediump float; precision highp int; -varying vec4 VertexOut_color; -varying highp vec3 VertexOut_normal; +varying vec4 vin_color; +varying highp vec3 vin_normal; void main() { - gl_FragData[0] = VertexOut_color + VertexOut_normal.xyzz; + gl_FragData[0] = vin_color + vin_normal.xyzz; } diff --git a/reference/shaders/legacy/fragment/struct-varying.legacy.frag b/reference/shaders/legacy/fragment/struct-varying.legacy.frag index f4782493..81b95dd8 100644 --- a/reference/shaders/legacy/fragment/struct-varying.legacy.frag +++ b/reference/shaders/legacy/fragment/struct-varying.legacy.frag @@ -8,15 +8,15 @@ struct Inputs highp vec2 b; }; -varying highp vec4 Inputs_a; -varying highp vec2 Inputs_b; +varying highp vec4 vin_a; +varying highp vec2 vin_b; void main() { - Inputs v0 = Inputs(Inputs_a, Inputs_b); - Inputs v1 = Inputs(Inputs_a, Inputs_b); - highp vec4 a = Inputs_a; - highp vec4 b = Inputs_b.xxyy; + Inputs v0 = Inputs(vin_a, vin_b); + Inputs v1 = Inputs(vin_a, vin_b); + highp vec4 a = vin_a; + highp vec4 b = vin_b.xxyy; gl_FragData[0] = ((((v0.a + v0.b.xxyy) + v1.a) + v1.b.yyxx) + a) + b; } diff --git a/reference/shaders/legacy/vert/io-block.legacy.vert b/reference/shaders/legacy/vert/io-block.legacy.vert index b6312369..3c518dc7 100644 --- a/reference/shaders/legacy/vert/io-block.legacy.vert +++ b/reference/shaders/legacy/vert/io-block.legacy.vert @@ -1,13 +1,13 @@ #version 100 attribute vec4 Position; -varying vec4 VertexOut_color; -varying vec3 VertexOut_normal; +varying vec4 vout_color; +varying vec3 vout_normal; void main() { gl_Position = Position; - VertexOut_color = vec4(1.0); - VertexOut_normal = vec3(0.5); + vout_color = vec4(1.0); + vout_normal = vec3(0.5); } diff --git a/reference/shaders/legacy/vert/struct-varying.legacy.vert b/reference/shaders/legacy/vert/struct-varying.legacy.vert index 9f2f0a91..261e9860 100644 --- a/reference/shaders/legacy/vert/struct-varying.legacy.vert +++ b/reference/shaders/legacy/vert/struct-varying.legacy.vert @@ -6,27 +6,27 @@ struct Output vec2 b; }; -varying vec4 Output_a; -varying vec2 Output_b; +varying vec4 vout_a; +varying vec2 vout_b; void main() { Output s = Output(vec4(0.5), vec2(0.25)); { Output vout = s; - Output_a = vout.a; - Output_b = vout.b; + vout_a = vout.a; + vout_b = vout.b; } { Output vout = s; - Output_a = vout.a; - Output_b = vout.b; + vout_a = vout.a; + vout_b = vout.b; } - Output tmp = Output(Output_a, Output_b); - Output_a = tmp.a; - Output_b = tmp.b; - Output_a.x = 1.0; - Output_b.y = 1.0; - float c = Output_a.x; + Output tmp = Output(vout_a, vout_b); + vout_a = tmp.a; + vout_b = tmp.b; + vout_a.x = 1.0; + vout_b.y = 1.0; + float c = vout_a.x; }