mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/ir: Validate LABEL instructions.
This commit is contained in:
parent
dd1b2feec0
commit
bc9db34cdc
Notes:
Alexandre Julliard
2024-01-18 23:21:17 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/570
@ -2846,6 +2846,16 @@ static void vsir_validate_instruction(struct validation_context *ctx)
|
|||||||
--ctx->depth;
|
--ctx->depth;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VKD3DSIH_LABEL:
|
||||||
|
vsir_validate_cf_type(ctx, instruction, CF_TYPE_BLOCKS);
|
||||||
|
vsir_validate_dst_count(ctx, instruction, 0);
|
||||||
|
vsir_validate_src_count(ctx, instruction, 1);
|
||||||
|
if (instruction->src_count >= 1 && !vsir_register_is_label(&instruction->src[0].reg))
|
||||||
|
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE,
|
||||||
|
"Invalid register of type %#x in a LABEL instruction, expected LABEL.",
|
||||||
|
instruction->src[0].reg.type);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user