[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).
This commit is contained in:
Bill Currie 2022-08-31 18:14:24 +09:00
parent 8c270a0a9e
commit 096ecc7710

View file

@ -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));