mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Validate indices for UAV registers.
This commit is contained in:
parent
3ab68c1e46
commit
0e50825b83
Notes:
Henri Verbeet
2024-10-03 19:35:06 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1142
@ -6245,6 +6245,18 @@ static void vsir_validate_register(struct validation_context *ctx,
|
|||||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DIMENSION,
|
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DIMENSION,
|
||||||
"Invalid dimension %#x for a UAV register.",
|
"Invalid dimension %#x for a UAV register.",
|
||||||
reg->dimension);
|
reg->dimension);
|
||||||
|
|
||||||
|
if (reg->idx_count != 2)
|
||||||
|
{
|
||||||
|
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX_COUNT,
|
||||||
|
"Invalid index count %u for a UAV register.",
|
||||||
|
reg->idx_count);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reg->idx[0].rel_addr)
|
||||||
|
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX,
|
||||||
|
"Non-NULL relative address for the descriptor index of a UAV register.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VKD3DSPR_DEPTHOUT:
|
case VKD3DSPR_DEPTHOUT:
|
||||||
|
Loading…
Reference in New Issue
Block a user