mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Allow a patch constant signature only for Hull and Domain Shaders.
This commit is contained in:
parent
16efb7c0c6
commit
7202e6e2f3
Notes:
Henri Verbeet
2024-10-09 13:19:13 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1159
@ -7042,6 +7042,18 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c
|
|||||||
if (!(config_flags & VKD3D_SHADER_CONFIG_FLAG_FORCE_VALIDATION))
|
if (!(config_flags & VKD3D_SHADER_CONFIG_FLAG_FORCE_VALIDATION))
|
||||||
return VKD3D_OK;
|
return VKD3D_OK;
|
||||||
|
|
||||||
|
switch (program->shader_version.type)
|
||||||
|
{
|
||||||
|
case VKD3D_SHADER_TYPE_HULL:
|
||||||
|
case VKD3D_SHADER_TYPE_DOMAIN:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (program->patch_constant_signature.element_count != 0)
|
||||||
|
validator_error(&ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
|
||||||
|
"Patch constant signature is only valid for hull and domain shaders.");
|
||||||
|
}
|
||||||
|
|
||||||
if (!(ctx.temps = vkd3d_calloc(ctx.program->temp_count, sizeof(*ctx.temps))))
|
if (!(ctx.temps = vkd3d_calloc(ctx.program->temp_count, sizeof(*ctx.temps))))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@ -245,6 +245,7 @@ enum vkd3d_shader_error
|
|||||||
VKD3D_SHADER_ERROR_VSIR_INVALID_GS = 9019,
|
VKD3D_SHADER_ERROR_VSIR_INVALID_GS = 9019,
|
||||||
VKD3D_SHADER_ERROR_VSIR_INVALID_PARAMETER = 9020,
|
VKD3D_SHADER_ERROR_VSIR_INVALID_PARAMETER = 9020,
|
||||||
VKD3D_SHADER_ERROR_VSIR_MISSING_SEMANTIC = 9021,
|
VKD3D_SHADER_ERROR_VSIR_MISSING_SEMANTIC = 9021,
|
||||||
|
VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE = 9022,
|
||||||
|
|
||||||
VKD3D_SHADER_WARNING_VSIR_DYNAMIC_DESCRIPTOR_ARRAY = 9300,
|
VKD3D_SHADER_WARNING_VSIR_DYNAMIC_DESCRIPTOR_ARRAY = 9300,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user