mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[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:
parent
8c270a0a9e
commit
096ecc7710
1 changed files with 1 additions and 2 deletions
|
@ -195,8 +195,7 @@ Vulkan_LoadTexArray (vulkan_ctx_t *ctx, tex_t *tex, int layers, int mip,
|
||||||
va (ctx->va_ctx, "memory:%s", name));
|
va (ctx->va_ctx, "memory:%s", name));
|
||||||
QFV_BindImageMemory (device, qtex->image, qtex->memory, 0);
|
QFV_BindImageMemory (device, qtex->image, qtex->memory, 0);
|
||||||
qtex->view = QFV_CreateImageView (device, qtex->image, vtype,
|
qtex->view = QFV_CreateImageView (device, qtex->image, vtype,
|
||||||
VK_FORMAT_R8G8B8A8_UNORM,
|
format, VK_IMAGE_ASPECT_COLOR_BIT);
|
||||||
VK_IMAGE_ASPECT_COLOR_BIT);
|
|
||||||
QFV_duSetObjectName (device, VK_OBJECT_TYPE_IMAGE_VIEW, qtex->view,
|
QFV_duSetObjectName (device, VK_OBJECT_TYPE_IMAGE_VIEW, qtex->view,
|
||||||
va (ctx->va_ctx, "iview:%s", name));
|
va (ctx->va_ctx, "iview:%s", name));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue