mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/dxil: Handle multi-row signature elements.
This commit is contained in:
parent
7113064a19
commit
e0d0a04b79
Notes:
Alexandre Julliard
2023-10-16 22:59:53 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/403
@ -2384,7 +2384,7 @@ static void sm6_parser_init_signature(struct sm6_parser *sm6, const struct shade
|
||||
{
|
||||
struct vkd3d_shader_dst_param *param;
|
||||
const struct signature_element *e;
|
||||
unsigned int i;
|
||||
unsigned int i, count;
|
||||
|
||||
for (i = 0; i < s->element_count; ++i)
|
||||
{
|
||||
@ -2392,8 +2392,11 @@ static void sm6_parser_init_signature(struct sm6_parser *sm6, const struct shade
|
||||
|
||||
param = ¶ms[i];
|
||||
dst_param_io_init(param, e, reg_type);
|
||||
param->reg.idx[0].offset = i;
|
||||
param->reg.idx_count = 1;
|
||||
count = 0;
|
||||
if (e->register_count > 1)
|
||||
param->reg.idx[count++].offset = 0;
|
||||
param->reg.idx[count++].offset = i;
|
||||
param->reg.idx_count = count;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2427,6 +2430,12 @@ static void sm6_parser_emit_signature(struct sm6_parser *sm6, const struct shade
|
||||
|
||||
ins->flags = e->interpolation_mode;
|
||||
*param = params[i];
|
||||
|
||||
if (e->register_count > 1)
|
||||
{
|
||||
param->reg.idx[0].rel_addr = NULL;
|
||||
param->reg.idx[0].offset = e->register_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ float4 main(in apple a) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
|
||||
probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
|
||||
|
||||
|
||||
% Arrays of matrices get successive indexes.
|
||||
@ -101,7 +101,12 @@ float4 main(in apple a) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
|
||||
probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
|
||||
|
||||
|
||||
% dxcompiler emits correct array addressing.
|
||||
[require]
|
||||
shader model < 6.0
|
||||
|
||||
|
||||
% Arrays (even multi-dimensional) of struct elements are allowed. The fields in the different struct
|
||||
@ -145,6 +150,10 @@ draw quad
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
|
||||
|
||||
[require]
|
||||
% reset requirements
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
struct apple
|
||||
{
|
||||
@ -201,7 +210,7 @@ float4 main(in float4 tex0 : TEXCOORD0, in float4 tex1 : TEXCOORD1) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo(sm>=6) probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
|
||||
probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
|
||||
|
||||
|
||||
% Output semantics cannot be mapped to more than one value.
|
||||
@ -272,7 +281,7 @@ float4 main(in float4 a : TEXCOORD0, in float3 b : TEXCOORD1) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
|
||||
|
||||
% In SM4, duplicated input semantics can only have different types if they have the same layout and
|
||||
|
Loading…
Reference in New Issue
Block a user