From 096ecc77103bbbaa61bf36e84f53be77be814657 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 31 Aug 2022 18:14:24 +0900 Subject: [PATCH] [vulkan] Fix incorrect image view format R8G8B8A8 was hard-coded by accident when creating Vulkan_LoadTexArray (or probably even the original Vulkan_LoadTex). This wasn't a problem while everything was loaded in that format, but attempting to load an R8 texture didn't go so well. The same format as the image itself is used now (correctly so). --- libs/video/renderer/vulkan/vulkan_texture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/video/renderer/vulkan/vulkan_texture.c b/libs/video/renderer/vulkan/vulkan_texture.c index 699b3af3d..5c4b9cba3 100644 --- a/libs/video/renderer/vulkan/vulkan_texture.c +++ b/libs/video/renderer/vulkan/vulkan_texture.c @@ -195,8 +195,7 @@ Vulkan_LoadTexArray (vulkan_ctx_t *ctx, tex_t *tex, int layers, int mip, va (ctx->va_ctx, "memory:%s", name)); QFV_BindImageMemory (device, qtex->image, qtex->memory, 0); qtex->view = QFV_CreateImageView (device, qtex->image, vtype, - VK_FORMAT_R8G8B8A8_UNORM, - VK_IMAGE_ASPECT_COLOR_BIT); + format, VK_IMAGE_ASPECT_COLOR_BIT); QFV_duSetObjectName (device, VK_OBJECT_TYPE_IMAGE_VIEW, qtex->view, va (ctx->va_ctx, "iview:%s", name));