aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2024-10-15 17:57:13 +0200
committerAndre Weissflog <floooh@gmail.com>2024-10-15 17:57:13 +0200
commit8745e45578e0b92ce3ffc225c64c61475d60bac6 (patch)
tree74ff22c67576618e50975b7c94584f5fb8513773
parente04b442d1cf5e45ee3df677b92853ffedde0fefc (diff)
sokol_gl.h: update d3d11 shader blobs
-rw-r--r--util/sokol_gl.h90
1 files changed, 88 insertions, 2 deletions
diff --git a/util/sokol_gl.h b/util/sokol_gl.h
index 558091ea..4e4a2179 100644
--- a/util/sokol_gl.h
+++ b/util/sokol_gl.h
@@ -2285,7 +2285,60 @@ static const uint8_t _sgl_fs_source_metal_sim[439] = {
0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
};
#elif defined(SOKOL_D3D11)
-FIXME
+/*
+ cbuffer vs_params : register(b0)
+ {
+ row_major float4x4 _19_mvp : packoffset(c0);
+ row_major float4x4 _19_tm : packoffset(c4);
+ };
+
+
+ static float4 gl_Position;
+ static float gl_PointSize;
+ static float4 position;
+ static float psize;
+ static float4 uv;
+ static float2 texcoord0;
+ static float4 color;
+ static float4 color0;
+
+ struct SPIRV_Cross_Input
+ {
+ float4 position : TEXCOORD0;
+ float2 texcoord0 : TEXCOORD1;
+ float4 color0 : TEXCOORD2;
+ float psize : TEXCOORD3;
+ };
+
+ struct SPIRV_Cross_Output
+ {
+ float4 uv : TEXCOORD0;
+ float4 color : TEXCOORD1;
+ float4 gl_Position : SV_Position;
+ };
+
+ void vert_main()
+ {
+ gl_Position = mul(position, _19_mvp);
+ gl_PointSize = psize;
+ uv = mul(float4(texcoord0, 0.0f, 1.0f), _19_tm);
+ color = color0;
+ }
+
+ SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
+ {
+ position = stage_input.position;
+ psize = stage_input.psize;
+ texcoord0 = stage_input.texcoord0;
+ color0 = stage_input.color0;
+ vert_main();
+ SPIRV_Cross_Output stage_output;
+ stage_output.gl_Position = gl_Position;
+ stage_output.uv = uv;
+ stage_output.color = color;
+ return stage_output;
+ }
+*/
static const uint8_t _sgl_vs_bytecode_hlsl4[1032] = {
0x44,0x58,0x42,0x43,0x74,0x7f,0x01,0xd9,0xf4,0xd5,0xed,0x1d,0x74,0xc1,0x30,0x27,
0xd8,0xe9,0x9d,0x50,0x01,0x00,0x00,0x00,0x08,0x04,0x00,0x00,0x05,0x00,0x00,0x00,
@@ -2353,6 +2406,40 @@ static const uint8_t _sgl_vs_bytecode_hlsl4[1032] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
+/*
+ Texture2D<float4> tex : register(t0);
+ SamplerState smp : register(s0);
+
+ static float4 frag_color;
+ static float4 uv;
+ static float4 color;
+
+ struct SPIRV_Cross_Input
+ {
+ float4 uv : TEXCOORD0;
+ float4 color : TEXCOORD1;
+ };
+
+ struct SPIRV_Cross_Output
+ {
+ float4 frag_color : SV_Target0;
+ };
+
+ void frag_main()
+ {
+ frag_color = tex.Sample(smp, uv.xy) * color;
+ }
+
+ SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
+ {
+ uv = stage_input.uv;
+ color = stage_input.color;
+ frag_main();
+ SPIRV_Cross_Output stage_output;
+ stage_output.frag_color = frag_color;
+ return stage_output;
+ }
+*/
static const uint8_t _sgl_fs_bytecode_hlsl4[608] = {
0x44,0x58,0x42,0x43,0xc8,0x9b,0x66,0x64,0x80,0x2f,0xbe,0x14,0xd9,0x88,0xa0,0x97,
0x64,0x14,0x66,0xff,0x01,0x00,0x00,0x00,0x60,0x02,0x00,0x00,0x05,0x00,0x00,0x00,
@@ -2392,7 +2479,6 @@ static const uint8_t _sgl_fs_bytecode_hlsl4[608] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
};
#elif defined(SOKOL_WGPU)
/*