2021-01-17 17:10:56 +00:00
|
|
|
#ifndef __QF_Vulkan_qf_texture_h
|
|
|
|
#define __QF_Vulkan_qf_texture_h
|
|
|
|
|
|
|
|
#include "QF/image.h"
|
2021-01-19 09:15:05 +00:00
|
|
|
#include "QF/Vulkan/qf_vid.h"
|
2021-01-17 17:10:56 +00:00
|
|
|
|
2021-01-19 09:15:05 +00:00
|
|
|
typedef struct qfv_tex_s {
|
|
|
|
VkDeviceMemory memory;
|
|
|
|
VkImage image;
|
|
|
|
VkImageView view;
|
|
|
|
} qfv_tex_t;
|
2021-01-17 17:10:56 +00:00
|
|
|
|
2021-12-17 03:20:32 +00:00
|
|
|
typedef struct texturectx_s {
|
|
|
|
VkDescriptorPool pool;
|
|
|
|
VkDescriptorSetLayout setLayout;
|
|
|
|
} texturectx_t;
|
|
|
|
|
2021-01-20 15:40:22 +00:00
|
|
|
void Vulkan_ExpandPalette (byte *dst, const byte *src, const byte *palette,
|
|
|
|
int alpha, int count);
|
2021-01-31 10:58:55 +00:00
|
|
|
qfv_tex_t *Vulkan_LoadTex (struct vulkan_ctx_s *ctx, tex_t *tex, int mip,
|
|
|
|
const char *name);
|
2022-05-26 09:43:15 +00:00
|
|
|
qfv_tex_t *Vulkan_LoadTexArray (struct vulkan_ctx_s *ctx, tex_t *tex,
|
|
|
|
int layers, int mip, const char *name);
|
2021-03-25 06:54:34 +00:00
|
|
|
qfv_tex_t *Vulkan_LoadEnvMap (struct vulkan_ctx_s *ctx, tex_t *tex,
|
|
|
|
const char *name);
|
|
|
|
qfv_tex_t *Vulkan_LoadEnvSides (struct vulkan_ctx_s *ctx, tex_t **tex,
|
|
|
|
const char *name);
|
2021-01-17 17:10:56 +00:00
|
|
|
VkImageView Vulkan_TexImageView (qfv_tex_t *tex) __attribute__((pure));
|
2022-11-15 00:18:26 +00:00
|
|
|
void Vulkan_UpdateTex (struct vulkan_ctx_s *ctx, qfv_tex_t *tex, tex_t *src,
|
|
|
|
int x, int y, int layer, int mip);
|
2021-01-17 17:10:56 +00:00
|
|
|
void Vulkan_UnloadTex (struct vulkan_ctx_s *ctx, qfv_tex_t *tex);
|
2021-01-23 06:40:31 +00:00
|
|
|
void Vulkan_Texture_Init (struct vulkan_ctx_s *ctx);
|
|
|
|
void Vulkan_Texture_Shutdown (struct vulkan_ctx_s *ctx);
|
2021-12-17 03:20:32 +00:00
|
|
|
VkDescriptorSet Vulkan_CreateCombinedImageSampler (struct vulkan_ctx_s *ctx,
|
|
|
|
VkImageView view,
|
|
|
|
VkSampler sampler);
|
|
|
|
VkDescriptorSet Vulkan_CreateTextureDescriptor (struct vulkan_ctx_s *ctx,
|
|
|
|
qfv_tex_t *tex,
|
|
|
|
VkSampler sampler);
|
|
|
|
void Vulkan_FreeTexture (struct vulkan_ctx_s *ctx, VkDescriptorSet texture);
|
2021-01-17 17:10:56 +00:00
|
|
|
|
|
|
|
#endif//__QF_Vulkan_qf_texture_h
|