mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Validate OUTPUT registers.
This commit is contained in:
parent
349fdd0843
commit
62d5bc91f5
Notes:
Henri Verbeet
2024-10-17 17:40:38 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1196
@ -6230,6 +6230,32 @@ static void vsir_validate_io_register(struct validation_context *ctx,
|
||||
}
|
||||
break;
|
||||
|
||||
case VKD3DSPR_OUTPUT:
|
||||
switch (ctx->program->shader_version.type)
|
||||
{
|
||||
case VKD3D_SHADER_TYPE_HULL:
|
||||
if (ctx->phase == VKD3DSIH_HS_CONTROL_POINT_PHASE)
|
||||
{
|
||||
signature = &ctx->program->output_signature;
|
||||
has_control_point = ctx->program->normalised_hull_cp_io;
|
||||
}
|
||||
else if (ctx->program->normalised_io)
|
||||
{
|
||||
signature = &ctx->program->output_signature;
|
||||
has_control_point = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
signature = &ctx->program->patch_constant_signature;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
signature = &ctx->program->output_signature;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
vkd3d_unreachable();
|
||||
}
|
||||
@ -6624,6 +6650,10 @@ static void vsir_validate_register(struct validation_context *ctx,
|
||||
vsir_validate_rastout_register(ctx, reg);
|
||||
break;
|
||||
|
||||
case VKD3DSPR_OUTPUT:
|
||||
vsir_validate_io_register(ctx, reg);
|
||||
break;
|
||||
|
||||
case VKD3DSPR_DEPTHOUT:
|
||||
vsir_validate_register_without_indices(ctx, reg);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user