vkd3d-shader/dxil: Allow empty struct types.

This commit is contained in:
Conor McCarthy 2023-11-02 13:56:25 +10:00 committed by Alexandre Julliard
parent dbcc4c4e40
commit 7419f4e31d
Notes: Alexandre Julliard 2023-11-02 22:50:28 +01: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/440
2 changed files with 2 additions and 2 deletions

View File

@ -1374,7 +1374,7 @@ static enum vkd3d_result sm6_parser_type_table_init(struct sm6_parser *sm6)
case TYPE_CODE_STRUCT_ANON:
case TYPE_CODE_STRUCT_NAMED:
if (!dxil_record_validate_operand_min_count(record, 2, sm6))
if (!dxil_record_validate_operand_min_count(record, 1, sm6))
return VKD3D_ERROR_INVALID_SHADER;
if (record->code == TYPE_CODE_STRUCT_NAMED && !struct_name)
{

View File

@ -45,7 +45,7 @@ float4 main() : sv_target
[test]
uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0
todo(sm>=6) draw quad
draw quad
probe all rgba (1.0, 2.0, 5.0, 0.0)