vkd3d-shader/ir: Only allow PATCHCONST registers as destination parameteres in Hull Shaders.

This commit is contained in:
Giovanni Mascellani 2024-10-09 23:05:47 +02:00 committed by Henri Verbeet
parent f2d181e65c
commit f0e31dd6b3
Notes: Henri Verbeet 2024-10-10 20:10:37 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1172

View File

@ -6396,6 +6396,12 @@ static void vsir_validate_dst_param(struct validation_context *ctx,
"Invalid %#x register used as destination parameter.", dst->reg.type);
break;
case VKD3DSPR_PATCHCONST:
if (ctx->program->shader_version.type != VKD3D_SHADER_TYPE_HULL)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE,
"PATCHCONST register used as destination parameters are only allowed in Hull Shaders.");
break;
default:
break;
}