aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/sokol_imgui.h84
1 files changed, 82 insertions, 2 deletions
diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h
index 051d993d..3921694e 100644
--- a/util/sokol_imgui.h
+++ b/util/sokol_imgui.h
@@ -1902,7 +1902,54 @@ static const uint8_t _simgui_fs_source_metal_sim[436] = {
0x7d,0x0a,0x0a,0x00,
};
#elif defined(SOKOL_D3D11)
-FIXME!
+/*
+ cbuffer vs_params : register(b0)
+ {
+ float2 _22_disp_size : packoffset(c0);
+ };
+
+
+ static float4 gl_Position;
+ static float2 position;
+ static float2 uv;
+ static float2 texcoord0;
+ static float4 color;
+ static float4 color0;
+
+ struct SPIRV_Cross_Input
+ {
+ float2 position : TEXCOORD0;
+ float2 texcoord0 : TEXCOORD1;
+ float4 color0 : TEXCOORD2;
+ };
+
+ struct SPIRV_Cross_Output
+ {
+ float2 uv : TEXCOORD0;
+ float4 color : TEXCOORD1;
+ float4 gl_Position : SV_Position;
+ };
+
+ void vert_main()
+ {
+ gl_Position = float4(((position / _22_disp_size) - 0.5f.xx) * float2(2.0f, -2.0f), 0.5f, 1.0f);
+ uv = texcoord0;
+ color = color0;
+ }
+
+ SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
+ {
+ position = stage_input.position;
+ 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 _simgui_vs_bytecode_hlsl4[892] = {
0x44,0x58,0x42,0x43,0x0d,0xbd,0x9e,0x9e,0x7d,0xc0,0x2b,0x54,0x88,0xf9,0xca,0x89,
0x32,0xe4,0x0c,0x59,0x01,0x00,0x00,0x00,0x7c,0x03,0x00,0x00,0x05,0x00,0x00,0x00,
@@ -1961,6 +2008,40 @@ static const uint8_t _simgui_vs_bytecode_hlsl4[892] = {
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,
};
+/*
+ Texture2D<float4> tex : register(t0);
+ SamplerState smp : register(s0);
+
+ static float4 frag_color;
+ static float2 uv;
+ static float4 color;
+
+ struct SPIRV_Cross_Input
+ {
+ float2 uv : TEXCOORD0;
+ float4 color : TEXCOORD1;
+ };
+
+ struct SPIRV_Cross_Output
+ {
+ float4 frag_color : SV_Target0;
+ };
+
+ void frag_main()
+ {
+ frag_color = tex.Sample(smp, uv) * 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 _simgui_fs_bytecode_hlsl4[608] = {
0x44,0x58,0x42,0x43,0x3a,0xa7,0x41,0x21,0xb4,0x2d,0xa7,0x6e,0xfe,0x31,0xb0,0xe0,
0x14,0xe0,0xdf,0x5a,0x01,0x00,0x00,0x00,0x60,0x02,0x00,0x00,0x05,0x00,0x00,0x00,
@@ -2000,7 +2081,6 @@ static const uint8_t _simgui_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)
/*