Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@google.com>2019-11-05 21:19:19 +0300
committerDan Sinclair <dsinclair@google.com>2019-11-05 21:19:19 +0300
commitd409210ee519b25b760042240f49bf3667b0c752 (patch)
treeb5bf39a193826a211097c6d8edbc00c3d4d5f32b /reference/shaders-hlsl
parente5af41255c480c75894811e7a5fd2ec898da9070 (diff)
Move all .invalid shaders into no-opt folders.
Diffstat (limited to 'reference/shaders-hlsl')
-rw-r--r--reference/shaders-hlsl/asm/comp/storage-buffer-basic.invalid.nofxc.asm.comp32
-rw-r--r--reference/shaders-hlsl/comp/subgroups.invalid.nofxc.sm60.comp95
-rw-r--r--reference/shaders-hlsl/frag/constant-buffer-array.invalid.sm51.frag44
-rw-r--r--reference/shaders-hlsl/frag/fp16.invalid.desktop.frag179
4 files changed, 0 insertions, 350 deletions
diff --git a/reference/shaders-hlsl/asm/comp/storage-buffer-basic.invalid.nofxc.asm.comp b/reference/shaders-hlsl/asm/comp/storage-buffer-basic.invalid.nofxc.asm.comp
deleted file mode 100644
index c567fbaf..00000000
--- a/reference/shaders-hlsl/asm/comp/storage-buffer-basic.invalid.nofxc.asm.comp
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef SPIRV_CROSS_CONSTANT_ID_0
-#define SPIRV_CROSS_CONSTANT_ID_0 1u
-#endif
-static const uint _3 = SPIRV_CROSS_CONSTANT_ID_0;
-#ifndef SPIRV_CROSS_CONSTANT_ID_2
-#define SPIRV_CROSS_CONSTANT_ID_2 3u
-#endif
-static const uint _4 = SPIRV_CROSS_CONSTANT_ID_2;
-static const uint3 gl_WorkGroupSize = uint3(_3, 2u, _4);
-
-RWByteAddressBuffer _8 : register(u0);
-RWByteAddressBuffer _9 : register(u1);
-
-static uint3 gl_WorkGroupID;
-struct SPIRV_Cross_Input
-{
- uint3 gl_WorkGroupID : SV_GroupID;
-};
-
-static uint3 _22 = gl_WorkGroupSize;
-
-void comp_main()
-{
- _8.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_9.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_8.Load(gl_WorkGroupID.x * 4 + 0))));
-}
-
-[numthreads(SPIRV_CROSS_CONSTANT_ID_0, 2, SPIRV_CROSS_CONSTANT_ID_2)]
-void main(SPIRV_Cross_Input stage_input)
-{
- gl_WorkGroupID = stage_input.gl_WorkGroupID;
- comp_main();
-}
diff --git a/reference/shaders-hlsl/comp/subgroups.invalid.nofxc.sm60.comp b/reference/shaders-hlsl/comp/subgroups.invalid.nofxc.sm60.comp
deleted file mode 100644
index 0957a708..00000000
--- a/reference/shaders-hlsl/comp/subgroups.invalid.nofxc.sm60.comp
+++ /dev/null
@@ -1,95 +0,0 @@
-static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
-
-RWByteAddressBuffer _9 : register(u0, space0);
-
-static uint4 gl_SubgroupEqMask;
-static uint4 gl_SubgroupGeMask;
-static uint4 gl_SubgroupGtMask;
-static uint4 gl_SubgroupLeMask;
-static uint4 gl_SubgroupLtMask;
-void comp_main()
-{
- _9.Store(0, asuint(float(WaveGetLaneCount())));
- _9.Store(0, asuint(float(WaveGetLaneIndex())));
- bool elected = WaveIsFirstLane();
- _9.Store(0, asuint(float4(gl_SubgroupEqMask).x));
- _9.Store(0, asuint(float4(gl_SubgroupGeMask).x));
- _9.Store(0, asuint(float4(gl_SubgroupGtMask).x));
- _9.Store(0, asuint(float4(gl_SubgroupLeMask).x));
- _9.Store(0, asuint(float4(gl_SubgroupLtMask).x));
- float4 broadcasted = WaveReadLaneAt(10.0f.xxxx, 8u);
- float3 first = WaveReadLaneFirst(20.0f.xxx);
- uint4 ballot_value = WaveActiveBallot(true);
- uint bit_count = countbits(ballot_value.x) + countbits(ballot_value.y) + countbits(ballot_value.z) + countbits(ballot_value.w);
- bool has_all = WaveActiveAllTrue(true);
- bool has_any = WaveActiveAnyTrue(true);
- bool has_equal = WaveActiveAllEqualBool(true);
- float4 added = WaveActiveSum(20.0f.xxxx);
- int4 iadded = WaveActiveSum(int4(20, 20, 20, 20));
- float4 multiplied = WaveActiveProduct(20.0f.xxxx);
- int4 imultiplied = WaveActiveProduct(int4(20, 20, 20, 20));
- float4 lo = WaveActiveMin(20.0f.xxxx);
- float4 hi = WaveActiveMax(20.0f.xxxx);
- int4 slo = WaveActiveMin(int4(20, 20, 20, 20));
- int4 shi = WaveActiveMax(int4(20, 20, 20, 20));
- uint4 ulo = WaveActiveMin(uint4(20u, 20u, 20u, 20u));
- uint4 uhi = WaveActiveMax(uint4(20u, 20u, 20u, 20u));
- uint4 anded = WaveActiveBitAnd(ballot_value);
- uint4 ored = WaveActiveBitOr(ballot_value);
- uint4 xored = WaveActiveBitXor(ballot_value);
- added = WavePrefixSum(added) + added;
- iadded = WavePrefixSum(iadded) + iadded;
- multiplied = WavePrefixProduct(multiplied) * multiplied;
- imultiplied = WavePrefixProduct(imultiplied) * imultiplied;
- added = WavePrefixSum(multiplied);
- multiplied = WavePrefixProduct(multiplied);
- iadded = WavePrefixSum(imultiplied);
- imultiplied = WavePrefixProduct(imultiplied);
- float4 swap_horiz = QuadReadAcrossX(20.0f.xxxx);
- float4 swap_vertical = QuadReadAcrossY(20.0f.xxxx);
- float4 swap_diagonal = QuadReadAcrossDiagonal(20.0f.xxxx);
- float4 quad_broadcast = QuadReadLaneAt(20.0f.xxxx, 3u);
-}
-
-[numthreads(1, 1, 1)]
-void main()
-{
- gl_SubgroupEqMask = 1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96));
- if (WaveGetLaneIndex() >= 32) gl_SubgroupEqMask.x = 0;
- if (WaveGetLaneIndex() >= 64 || WaveGetLaneIndex() < 32) gl_SubgroupEqMask.y = 0;
- if (WaveGetLaneIndex() >= 96 || WaveGetLaneIndex() < 64) gl_SubgroupEqMask.z = 0;
- if (WaveGetLaneIndex() < 96) gl_SubgroupEqMask.w = 0;
- gl_SubgroupGeMask = ~((1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u);
- if (WaveGetLaneIndex() >= 32) gl_SubgroupGeMask.x = 0u;
- if (WaveGetLaneIndex() >= 64) gl_SubgroupGeMask.y = 0u;
- if (WaveGetLaneIndex() >= 96) gl_SubgroupGeMask.z = 0u;
- if (WaveGetLaneIndex() < 32) gl_SubgroupGeMask.y = ~0u;
- if (WaveGetLaneIndex() < 64) gl_SubgroupGeMask.z = ~0u;
- if (WaveGetLaneIndex() < 96) gl_SubgroupGeMask.w = ~0u;
- uint gt_lane_index = WaveGetLaneIndex() + 1;
- gl_SubgroupGtMask = ~((1u << (gt_lane_index - uint4(0, 32, 64, 96))) - 1u);
- if (gt_lane_index >= 32) gl_SubgroupGtMask.x = 0u;
- if (gt_lane_index >= 64) gl_SubgroupGtMask.y = 0u;
- if (gt_lane_index >= 96) gl_SubgroupGtMask.z = 0u;
- if (gt_lane_index >= 128) gl_SubgroupGtMask.w = 0u;
- if (gt_lane_index < 32) gl_SubgroupGtMask.y = ~0u;
- if (gt_lane_index < 64) gl_SubgroupGtMask.z = ~0u;
- if (gt_lane_index < 96) gl_SubgroupGtMask.w = ~0u;
- uint le_lane_index = WaveGetLaneIndex() + 1;
- gl_SubgroupLeMask = (1u << (le_lane_index - uint4(0, 32, 64, 96))) - 1u;
- if (le_lane_index >= 32) gl_SubgroupLeMask.x = ~0u;
- if (le_lane_index >= 64) gl_SubgroupLeMask.y = ~0u;
- if (le_lane_index >= 96) gl_SubgroupLeMask.z = ~0u;
- if (le_lane_index >= 128) gl_SubgroupLeMask.w = ~0u;
- if (le_lane_index < 32) gl_SubgroupLeMask.y = 0u;
- if (le_lane_index < 64) gl_SubgroupLeMask.z = 0u;
- if (le_lane_index < 96) gl_SubgroupLeMask.w = 0u;
- gl_SubgroupLtMask = (1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u;
- if (WaveGetLaneIndex() >= 32) gl_SubgroupLtMask.x = ~0u;
- if (WaveGetLaneIndex() >= 64) gl_SubgroupLtMask.y = ~0u;
- if (WaveGetLaneIndex() >= 96) gl_SubgroupLtMask.z = ~0u;
- if (WaveGetLaneIndex() < 32) gl_SubgroupLtMask.y = 0u;
- if (WaveGetLaneIndex() < 64) gl_SubgroupLtMask.z = 0u;
- if (WaveGetLaneIndex() < 96) gl_SubgroupLtMask.w = 0u;
- comp_main();
-}
diff --git a/reference/shaders-hlsl/frag/constant-buffer-array.invalid.sm51.frag b/reference/shaders-hlsl/frag/constant-buffer-array.invalid.sm51.frag
deleted file mode 100644
index d330706c..00000000
--- a/reference/shaders-hlsl/frag/constant-buffer-array.invalid.sm51.frag
+++ /dev/null
@@ -1,44 +0,0 @@
-struct CBO_1
-{
- float4 a;
- float4 b;
- float4 c;
- float4 d;
-};
-
-ConstantBuffer<CBO_1> cbo[2][4] : register(b4, space0);
-cbuffer PushMe
-{
- float4 push_a : packoffset(c0);
- float4 push_b : packoffset(c1);
- float4 push_c : packoffset(c2);
- float4 push_d : packoffset(c3);
-};
-
-
-static float4 FragColor;
-
-struct SPIRV_Cross_Output
-{
- float4 FragColor : SV_Target0;
-};
-
-void frag_main()
-{
- FragColor = cbo[1][2].a;
- FragColor += cbo[1][2].b;
- FragColor += cbo[1][2].c;
- FragColor += cbo[1][2].d;
- FragColor += push_a;
- FragColor += push_b;
- FragColor += push_c;
- FragColor += push_d;
-}
-
-SPIRV_Cross_Output main()
-{
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.FragColor = FragColor;
- return stage_output;
-}
diff --git a/reference/shaders-hlsl/frag/fp16.invalid.desktop.frag b/reference/shaders-hlsl/frag/fp16.invalid.desktop.frag
deleted file mode 100644
index e10d6724..00000000
--- a/reference/shaders-hlsl/frag/fp16.invalid.desktop.frag
+++ /dev/null
@@ -1,179 +0,0 @@
-static min16float4 v4;
-static min16float3 v3;
-static min16float v1;
-static min16float2 v2;
-static float o1;
-static float2 o2;
-static float3 o3;
-static float4 o4;
-
-struct SPIRV_Cross_Input
-{
- min16float v1 : TEXCOORD0;
- min16float2 v2 : TEXCOORD1;
- min16float3 v3 : TEXCOORD2;
- min16float4 v4 : TEXCOORD3;
-};
-
-struct SPIRV_Cross_Output
-{
- float o1 : SV_Target0;
- float2 o2 : SV_Target1;
- float3 o3 : SV_Target2;
- float4 o4 : SV_Target3;
-};
-
-float mod(float x, float y)
-{
- return x - y * floor(x / y);
-}
-
-float2 mod(float2 x, float2 y)
-{
- return x - y * floor(x / y);
-}
-
-float3 mod(float3 x, float3 y)
-{
- return x - y * floor(x / y);
-}
-
-float4 mod(float4 x, float4 y)
-{
- return x - y * floor(x / y);
-}
-
-uint SPIRV_Cross_packFloat2x16(min16float2 value)
-{
- uint2 Packed = f32tof16(value);
- return Packed.x | (Packed.y << 16);
-}
-
-min16float2 SPIRV_Cross_unpackFloat2x16(uint value)
-{
- return min16float2(f16tof32(uint2(value & 0xffff, value >> 16)));
-}
-
-void test_constants()
-{
- min16float a = min16float(1.0);
- min16float b = min16float(1.5);
- min16float c = min16float(-1.5);
- min16float d = min16float(0.0 / 0.0);
- min16float e = min16float(1.0 / 0.0);
- min16float f = min16float(-1.0 / 0.0);
- min16float g = min16float(1014.0);
- min16float h = min16float(9.5367431640625e-07);
-}
-
-min16float test_result()
-{
- return min16float(1.0);
-}
-
-void test_conversions()
-{
- min16float one = test_result();
- int a = int(one);
- uint b = uint(one);
- bool c = one != min16float(0.0);
- float d = float(one);
- double e = double(one);
- min16float a2 = min16float(a);
- min16float b2 = min16float(b);
- min16float c2 = min16float(c);
- min16float d2 = min16float(d);
- min16float e2 = min16float(e);
-}
-
-void test_builtins()
-{
- min16float4 res = radians(v4);
- res = degrees(v4);
- res = sin(v4);
- res = cos(v4);
- res = tan(v4);
- res = asin(v4);
- res = atan2(v4, v3.xyzz);
- res = atan(v4);
- res = sinh(v4);
- res = cosh(v4);
- res = tanh(v4);
- res = pow(v4, v4);
- res = exp(v4);
- res = log(v4);
- res = exp2(v4);
- res = log2(v4);
- res = sqrt(v4);
- res = rsqrt(v4);
- res = abs(v4);
- res = sign(v4);
- res = floor(v4);
- res = trunc(v4);
- res = round(v4);
- res = ceil(v4);
- res = frac(v4);
- res = mod(v4, v4);
- min16float4 tmp;
- min16float4 _144 = modf(v4, tmp);
- res = _144;
- res = min(v4, v4);
- res = max(v4, v4);
- res = clamp(v4, v4, v4);
- res = lerp(v4, v4, v4);
- bool4 _164 = bool4(v4.x < v4.x, v4.y < v4.y, v4.z < v4.z, v4.w < v4.w);
- res = min16float4(_164.x ? v4.x : v4.x, _164.y ? v4.y : v4.y, _164.z ? v4.z : v4.z, _164.w ? v4.w : v4.w);
- res = step(v4, v4);
- res = smoothstep(v4, v4, v4);
- bool4 btmp = isnan(v4);
- btmp = isinf(v4);
- res = mad(v4, v4, v4);
- uint pack0 = SPIRV_Cross_packFloat2x16(v4.xy);
- uint pack1 = SPIRV_Cross_packFloat2x16(v4.zw);
- res = min16float4(SPIRV_Cross_unpackFloat2x16(pack0), SPIRV_Cross_unpackFloat2x16(pack1));
- min16float t0 = length(v4);
- t0 = distance(v4, v4);
- t0 = dot(v4, v4);
- min16float3 res3 = cross(v3, v3);
- res = normalize(v4);
- res = faceforward(v4, v4, v4);
- res = reflect(v4, v4);
- res = refract(v4, v4, v1);
- btmp = bool4(v4.x < v4.x, v4.y < v4.y, v4.z < v4.z, v4.w < v4.w);
- btmp = bool4(v4.x <= v4.x, v4.y <= v4.y, v4.z <= v4.z, v4.w <= v4.w);
- btmp = bool4(v4.x > v4.x, v4.y > v4.y, v4.z > v4.z, v4.w > v4.w);
- btmp = bool4(v4.x >= v4.x, v4.y >= v4.y, v4.z >= v4.z, v4.w >= v4.w);
- btmp = bool4(v4.x == v4.x, v4.y == v4.y, v4.z == v4.z, v4.w == v4.w);
- btmp = bool4(v4.x != v4.x, v4.y != v4.y, v4.z != v4.z, v4.w != v4.w);
- res = ddx(v4);
- res = ddy(v4);
- res = ddx_fine(v4);
- res = ddy_fine(v4);
- res = ddx_coarse(v4);
- res = ddy_coarse(v4);
- res = fwidth(v4);
- res = fwidth(v4);
- res = fwidth(v4);
-}
-
-void frag_main()
-{
- test_constants();
- test_conversions();
- test_builtins();
-}
-
-SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
-{
- v4 = stage_input.v4;
- v3 = stage_input.v3;
- v1 = stage_input.v1;
- v2 = stage_input.v2;
- frag_main();
- SPIRV_Cross_Output stage_output;
- stage_output.o1 = o1;
- stage_output.o2 = o2;
- stage_output.o3 = o3;
- stage_output.o4 = o4;
- return stage_output;
-}