blob: e6ffddff6a3e8e4c4157151f8ec582975280466d [file] [log] [blame]
dan sinclair196326c2024-12-06 12:40:09 +00001//
2// fragment_main
3//
dan sinclair949fa992024-09-16 17:26:13 +00004#version 310 es
5#extension GL_AMD_gpu_shader_half_float: require
6precision highp float;
7precision highp int;
dan sinclair6e93ca52024-08-28 23:58:04 +00008
dan sinclair949fa992024-09-16 17:26:13 +00009layout(binding = 0, std430)
James Price2312bfa2024-12-13 09:53:34 -080010buffer f_prevent_dce_block_ssbo {
James Price71c1d542024-10-10 23:01:19 +000011 int inner;
dan sinclair949fa992024-09-16 17:26:13 +000012} v;
13int transpose_b9ad1f() {
14 f16mat2x3 res = f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf));
dan sinclairec3114d2024-11-28 16:23:49 +000015 return mix(0, 1, (res[0u].x == 0.0hf));
dan sinclair949fa992024-09-16 17:26:13 +000016}
17void main() {
James Price71c1d542024-10-10 23:01:19 +000018 v.inner = transpose_b9ad1f();
dan sinclair949fa992024-09-16 17:26:13 +000019}
dan sinclair196326c2024-12-06 12:40:09 +000020//
21// compute_main
22//
dan sinclair949fa992024-09-16 17:26:13 +000023#version 310 es
24#extension GL_AMD_gpu_shader_half_float: require
dan sinclair6e93ca52024-08-28 23:58:04 +000025
dan sinclair949fa992024-09-16 17:26:13 +000026layout(binding = 0, std430)
James Price71c1d542024-10-10 23:01:19 +000027buffer prevent_dce_block_1_ssbo {
28 int inner;
dan sinclair949fa992024-09-16 17:26:13 +000029} v;
30int transpose_b9ad1f() {
31 f16mat2x3 res = f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf));
dan sinclairec3114d2024-11-28 16:23:49 +000032 return mix(0, 1, (res[0u].x == 0.0hf));
dan sinclair949fa992024-09-16 17:26:13 +000033}
34layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
35void main() {
James Price71c1d542024-10-10 23:01:19 +000036 v.inner = transpose_b9ad1f();
dan sinclair949fa992024-09-16 17:26:13 +000037}
dan sinclair196326c2024-12-06 12:40:09 +000038//
39// vertex_main
40//
dan sinclair949fa992024-09-16 17:26:13 +000041#version 310 es
42#extension GL_AMD_gpu_shader_half_float: require
43
44
45struct VertexOutput {
46 vec4 pos;
47 int prevent_dce;
48};
49
James Priceced63662024-12-13 10:48:26 -080050layout(location = 0) flat out int tint_interstage_location0;
dan sinclair949fa992024-09-16 17:26:13 +000051int transpose_b9ad1f() {
52 f16mat2x3 res = f16mat2x3(f16vec3(1.0hf), f16vec3(1.0hf));
dan sinclairec3114d2024-11-28 16:23:49 +000053 return mix(0, 1, (res[0u].x == 0.0hf));
dan sinclair949fa992024-09-16 17:26:13 +000054}
55VertexOutput vertex_main_inner() {
James Price49631b52024-12-13 13:34:39 -080056 VertexOutput v = VertexOutput(vec4(0.0f), 0);
57 v.pos = vec4(0.0f);
58 v.prevent_dce = transpose_b9ad1f();
59 return v;
dan sinclair949fa992024-09-16 17:26:13 +000060}
61void main() {
James Price49631b52024-12-13 13:34:39 -080062 VertexOutput v_1 = vertex_main_inner();
63 gl_Position = v_1.pos;
James Price25379d32024-11-28 21:23:47 +000064 gl_Position.y = -(gl_Position.y);
65 gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
James Price49631b52024-12-13 13:34:39 -080066 tint_interstage_location0 = v_1.prevent_dce;
dan sinclair949fa992024-09-16 17:26:13 +000067 gl_PointSize = 1.0f;
68}