Skip to content

Commit

Permalink
fix d3d11 samples (vertex_attrs => attrs)
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Sep 18, 2024
1 parent 1ec7e41 commit 6b02958
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion d3d11/arraytex-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
" float3 c2 = tex.Sample(smp, inp.uv2).xyz;\n"
" return float4(c0+c1+c2, 1.0);\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "TEXCOORD"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/binshader-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
sg_shader shd = sg_make_shader(&(sg_shader_desc){
.vertex_func.bytecode = SG_RANGE(vs_bin),
.fragment_func.bytecode = SG_RANGE(fs_bin),
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "COLOR"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/blend-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR): SV_Target0 {\n"
" return color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POS",
[1].hlsl_sem_name = "COLOR"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/bufferoffsets-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0): SV_Target0 {\n"
" return color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "COLOR"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/cube-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0): SV_Target0 {\n"
" return color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0] = { .hlsl_sem_name = "POSITION" },
[1] = { .hlsl_sem_name = "COLOR", .hlsl_sem_index = 1 },
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/dyntex-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
" return tex.Sample(smp, uv) * color;\n"
"}\n"
},
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "COLOR",
[2].hlsl_sem_name = "TEXCOORD"
Expand Down
2 changes: 1 addition & 1 deletion d3d11/inject-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float2 uv: TEXCOORD0): SV_Target0 {\n"
" return tex.Sample(smp, uv);\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "TEXCOORD"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/instancing-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0): SV_Target0 {\n"
" return color;\n"
"};\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "COLOR",
[2].hlsl_sem_name = "INSTPOS"
Expand Down
2 changes: 1 addition & 1 deletion d3d11/mipmap-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float2 uv: TEXCOORD0): SV_Target0 {\n"
" return tex.Sample(smp, uv);\n"
"};\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "TEXCOORD"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/mrt-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
" outp.c2 = float4(0.0, 0.0, b, 1.0);\n"
" return outp;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "BRIGHT"
},
Expand Down
4 changes: 2 additions & 2 deletions d3d11/offscreen-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0): SV_Target0 {\n"
" return color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "COLOR"
},
Expand Down Expand Up @@ -186,7 +186,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0, float2 uv: TEXCOORD0): SV_Target0 {\n"
" return tex.Sample(smp, uv) + color * 0.5;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POSITION",
[1].hlsl_sem_name = "COLOR",
[2].hlsl_sem_name = "TEXCOORD"
Expand Down
2 changes: 1 addition & 1 deletion d3d11/quad-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0): SV_Target0 {\n"
" return color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POS",
[1].hlsl_sem_name = "COLOR"
},
Expand Down
2 changes: 1 addition & 1 deletion d3d11/texcube-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0, float2 uv: TEXCOORD0): SV_Target0 {\n"
" return tex.Sample(smp, uv) * color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0] = { .hlsl_sem_name="POSITION" },
[1] = { .hlsl_sem_name="COLOR", .hlsl_sem_index=1 },
[2] = { .hlsl_sem_name="TEXCOORD", .hlsl_sem_index=1 }
Expand Down
2 changes: 1 addition & 1 deletion d3d11/triangle-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float4 color: COLOR0): SV_Target0 {\n"
" return color;\n"
"}\n",
.vertex_attrs = {
.attrs = {
[0].hlsl_sem_name = "POS",
[1].hlsl_sem_name = "COLOR"
},
Expand Down

0 comments on commit 6b02958

Please sign in to comment.