From c3757e6930fdf9576ca951dea43a7e093c44eba6 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Thu, 26 Sep 2024 19:06:18 +0200 Subject: [PATCH] vkd3d-shader/ir: Validate index count for DEPTHOUT 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 4d02184a..5e8041fc 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -6223,6 +6223,13 @@ static void vsir_validate_register(struct validation_context *ctx, reg->dimension); break; + case VKD3DSPR_DEPTHOUT: + if (reg->idx_count != 0) + validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX_COUNT, + "Invalid index count %u for a DEPTHOUT register.", + reg->idx_count); + break; + default: break; }