vkd3d-shader/hlsl: Store stream index in struct hlsl_semantic.

In addition, support stream indices in tpf_write_signature().
This commit is contained in:
Shaun Ren
2025-03-20 21:28:02 -04:00
committed by Henri Verbeet
parent d368d18527
commit d5dcf31123
Notes: Henri Verbeet 2025-06-02 21:00:38 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1518
5 changed files with 65 additions and 66 deletions

View File

@@ -233,7 +233,7 @@ void main(InputPatch<gs_data, 3> data, InputPatch<gs_data2, 3> data2, InputPatch
{
}
[geometry shader fail todo(sm>=5)]
[geometry shader fail]
struct gs_data
{
float4 pos : SV_POSITION;
@@ -254,7 +254,7 @@ void main(InputPatch<gs_data, 3> data, InputPatch<gs_data2, 4> data2, InputPatch
{
}
[geometry shader fail todo(sm>=5)]
[geometry shader fail]
struct gs_data
{
float4 pos : SV_POSITION;
@@ -691,7 +691,7 @@ void main(point gs_data vin[1], inout PointStream<gs_data> vout)
% The total component count of all outputs are used. If the allocated registers overlap,
% the largest allocation size is used for the calculation.
[geometry shader fail(sm<5) todo(sm>=5)]
[geometry shader fail(sm<5)]
struct gs_data
{
float2 x : X; // Allocates to o0.xy
@@ -712,7 +712,7 @@ void main(point gs_data vin[1], inout PointStream<gs_data> vout1, inout PointStr
vout2.Append((gs_data2)0);
}
[geometry shader fail todo(sm>=5)]
[geometry shader fail]
struct gs_data
{
float2 x : X; // Allocates to o0.xy

View File

@@ -1363,35 +1363,6 @@ static void test_emit_signature(void)
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
static const uint32_t dxbc_gs[] =
{
0x43425844, 0xe27a1766, 0x53623db9, 0x85065db9, 0x79f2e81e, 0x00000001, 0x00000324, 0x00000005,
0x00000034, 0x000000ac, 0x000000dc, 0x00000174, 0x00000288, 0x46454452, 0x00000070, 0x00000000,
0x00000000, 0x00000000, 0x0000003c, 0x47530500, 0x00000100, 0x0000003c, 0x31314452, 0x0000003c,
0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x31207265, 0x2e302e30,
0x31303031, 0x36312e31, 0x00343833, 0x4e475349, 0x00000028, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x7a6d6573, 0xababab00, 0x3547534f,
0x00000090, 0x00000004, 0x00000008, 0x00000000, 0x00000078, 0x00000000, 0x00000001, 0x00000003,
0x00000000, 0x0000000f, 0x00000000, 0x00000084, 0x00000000, 0x00000000, 0x00000003, 0x00000001,
0x0000000f, 0x00000001, 0x00000078, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f,
0x00000001, 0x00000089, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, 0x505f5653,
0x5449534f, 0x004e4f49, 0x786d6573, 0x6d657300, 0xabab0079, 0x58454853, 0x0000010c, 0x00020050,
0x00000043, 0x0100086a, 0x0400005f, 0x002010f2, 0x00000003, 0x00000000, 0x0100185d, 0x0300008f,
0x00110000, 0x00000000, 0x0100085c, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065,
0x001020f2, 0x00000001, 0x0300008f, 0x00110000, 0x00000001, 0x0100085c, 0x04000067, 0x001020f2,
0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, 0x0200005e, 0x0000000c, 0x08000036,
0x001020f2, 0x00000000, 0x00004002, 0x3f800000, 0x40000000, 0x40400000, 0x40800000, 0x06000036,
0x001020f2, 0x00000001, 0x00201e46, 0x00000000, 0x00000000, 0x03000075, 0x00110000, 0x00000000,
0x08000036, 0x001020f2, 0x00000000, 0x00004002, 0x41300000, 0x41400000, 0x41500000, 0x41600000,
0x06000036, 0x001020f2, 0x00000001, 0x00201e46, 0x00000001, 0x00000000, 0x03000075, 0x00110000,
0x00000001, 0x0100003e, 0x54415453, 0x00000094, 0x00000007, 0x00000000, 0x00000000, 0x00000005,
0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000c, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000,
};
static const struct emit_signature_test
{
@@ -1637,7 +1608,7 @@ static void test_emit_signature(void)
},
{
"gs_5_0",
{dxbc_gs, sizeof(dxbc_gs)},
{NULL, 0},
"struct input_data\n"
"{\n"
" float4 z : semz;\n"