From 44ab39c57ce89cc5bef8c324c77a611267e10d1d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 19 Nov 2022 10:46:12 +0000 Subject: [PATCH] Vk_LoadPic fix unitialized var. R_MarkLeaves data alignment to int when merging PVS clusters like GL renderers. --- src/vk/vk_image.c | 1 + src/vk/vk_rsurf.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vk/vk_image.c b/src/vk/vk_image.c index 6cbe3d7..90a58bf 100644 --- a/src/vk/vk_image.c +++ b/src/vk/vk_image.c @@ -1135,6 +1135,7 @@ Vk_LoadPic(const char *name, byte *pic, int width, int realwidth, image->registration_sequence = registration_sequence; // zero-clear Vulkan texture handle QVVKTEXTURE_CLEAR(image->vk_texture); + texBuffer = 0; image->width = realwidth; image->height = realheight; image->type = type; diff --git a/src/vk/vk_rsurf.c b/src/vk/vk_rsurf.c index f0417ce..f698f83 100644 --- a/src/vk/vk_rsurf.c +++ b/src/vk/vk_rsurf.c @@ -980,7 +980,7 @@ cluster void R_MarkLeaves (void) { const byte *vis; - byte fatvis[MAX_MAP_LEAFS/8]; + YQ2_ALIGNAS_TYPE(int) byte fatvis[MAX_MAP_LEAFS/8]; mnode_t *node; int i; mleaf_t *leaf;