vkd3d-shader/ir: Validate index count for NULL registers.

This commit is contained in:
Giovanni Mascellani 2023-11-08 23:12:30 +01:00 committed by Alexandre Julliard
parent 12fcb8dcc6
commit c867682982
Notes: Alexandre Julliard 2023-11-10 00:10:44 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/462

View File

@ -1542,6 +1542,12 @@ static void vsir_validate_register(struct validation_context *ctx,
reg->idx[0].offset, temp_count);
break;
case VKD3DSPR_NULL:
if (reg->idx_count != 0)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX_COUNT, "Invalid index count %u for a NULL register.",
reg->idx_count);
break;
default:
break;
}