vkd3d-shader/ir: Validate control point counts correctly.

Allow zero input control points for domain shaders, and zero output
control points for hull shaders.
This commit is contained in:
Shaun Ren 2024-10-17 11:08:37 -04:00 committed by Henri Verbeet
parent 976fe27836
commit 768b19d410
Notes: Henri Verbeet 2024-10-21 18:41:50 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1194

View File

@ -7700,8 +7700,10 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c
switch (program->shader_version.type)
{
case VKD3D_SHADER_TYPE_HULL:
case VKD3D_SHADER_TYPE_DOMAIN:
break;
case VKD3D_SHADER_TYPE_HULL:
case VKD3D_SHADER_TYPE_GEOMETRY:
if (program->input_control_point_count == 0)
validator_error(&ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
@ -7718,9 +7720,6 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c
switch (program->shader_version.type)
{
case VKD3D_SHADER_TYPE_HULL:
if (program->output_control_point_count == 0)
validator_error(&ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
"Invalid zero output control point count.");
break;
default: