mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Validate PATCHCONST registers.
This commit is contained in:
parent
62d5bc91f5
commit
a4ab53ab7b
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
@ -6256,6 +6256,10 @@ static void vsir_validate_io_register(struct validation_context *ctx,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VKD3DSPR_PATCHCONST:
|
||||||
|
signature = &ctx->program->patch_constant_signature;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vkd3d_unreachable();
|
vkd3d_unreachable();
|
||||||
}
|
}
|
||||||
@ -6314,7 +6318,7 @@ static void vsir_validate_io_register(struct validation_context *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
element = &signature->elements[signature_idx];
|
element = &signature->elements[signature_idx];
|
||||||
if (element->register_count > 1)
|
if (element->register_count > 1 || vsir_sysval_semantic_is_tess_factor(element->sysval_semantic))
|
||||||
is_array = true;
|
is_array = true;
|
||||||
|
|
||||||
expected_idx_count = 1 + !!has_control_point + !!is_array;
|
expected_idx_count = 1 + !!has_control_point + !!is_array;
|
||||||
@ -6690,6 +6694,10 @@ static void vsir_validate_register(struct validation_context *ctx,
|
|||||||
vsir_validate_uav_register(ctx, reg);
|
vsir_validate_uav_register(ctx, reg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VKD3DSPR_PATCHCONST:
|
||||||
|
vsir_validate_io_register(ctx, reg);
|
||||||
|
break;
|
||||||
|
|
||||||
case VKD3DSPR_DEPTHOUTGE:
|
case VKD3DSPR_DEPTHOUTGE:
|
||||||
vsir_validate_register_without_indices(ctx, reg);
|
vsir_validate_register_without_indices(ctx, reg);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user