From 19d35d89cdb7464723367e46ed06bbb60e98136f Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Thu, 26 Sep 2024 21:27:31 +0200 Subject: [PATCH] vkd3d-shader/ir: Validate index count for DEPTHOUTLE registers. --- libs/vkd3d-shader/ir.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 4a6a5269..a9c9243a 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -6237,6 +6237,13 @@ static void vsir_validate_register(struct validation_context *ctx, reg->idx_count); break; + case VKD3DSPR_DEPTHOUTLE: + if (reg->idx_count != 0) + validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX_COUNT, + "Invalid index count %u for a DEPTHOUTLE register.", + reg->idx_count); + break; + default: break; }