mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Validate the input control point count.
This commit is contained in:
parent
90616be301
commit
bd3ba87747
Notes:
Henri Verbeet
2024-10-15 17:05:01 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1181
@ -7501,6 +7501,23 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c
|
|||||||
"Patch constant signature is only valid for hull and domain shaders.");
|
"Patch constant signature is only valid for hull and domain shaders.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (program->shader_version.type)
|
||||||
|
{
|
||||||
|
case VKD3D_SHADER_TYPE_HULL:
|
||||||
|
case VKD3D_SHADER_TYPE_DOMAIN:
|
||||||
|
case VKD3D_SHADER_TYPE_GEOMETRY:
|
||||||
|
if (program->input_control_point_count == 0)
|
||||||
|
validator_error(&ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||||
|
"Invalid zero input control point count.");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (program->input_control_point_count != 0)
|
||||||
|
validator_error(&ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||||
|
"Invalid input control point count %u.",
|
||||||
|
program->input_control_point_count);
|
||||||
|
}
|
||||||
|
|
||||||
vsir_validate_signature(&ctx, &program->input_signature, SIGNATURE_TYPE_INPUT);
|
vsir_validate_signature(&ctx, &program->input_signature, SIGNATURE_TYPE_INPUT);
|
||||||
vsir_validate_signature(&ctx, &program->output_signature, SIGNATURE_TYPE_OUTPUT);
|
vsir_validate_signature(&ctx, &program->output_signature, SIGNATURE_TYPE_OUTPUT);
|
||||||
vsir_validate_signature(&ctx, &program->patch_constant_signature, SIGNATURE_TYPE_PATCH_CONSTANT);
|
vsir_validate_signature(&ctx, &program->patch_constant_signature, SIGNATURE_TYPE_PATCH_CONSTANT);
|
||||||
|
Loading…
Reference in New Issue
Block a user