Update tests for struct flattening.
This commit is contained in:
Родитель
18f60ed9a9
Коммит
23f0abf112
|
@ -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()
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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]));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ struct CBO_1
|
|||
ConstantBuffer<CBO_1> 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()
|
||||
|
|
|
@ -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<float4> 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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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]));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ struct CBO_1
|
|||
ConstantBuffer<CBO_1> 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()
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<float4> 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче