mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
While every possible subsystem needs an initialization call, all that does is add the actual initialization task to the render graph system. This allows the render graph to be fully configurable, initializing only those subsystems that the graph needs. Scripted initialization is still separated from startup as render graph creation needs various resources (eg, attachments) defined before creating render and compute passes, but all those need to be created before the subsystems can actually start up.
40 lines
1.5 KiB
C
40 lines
1.5 KiB
C
#ifndef __QF_Vulkan_qf_texture_h
|
|
#define __QF_Vulkan_qf_texture_h
|
|
|
|
#include "QF/image.h"
|
|
#include "QF/Vulkan/qf_vid.h"
|
|
|
|
typedef struct qfv_tex_s {
|
|
VkDeviceMemory memory;
|
|
VkImage image;
|
|
VkImageView view;
|
|
} qfv_tex_t;
|
|
|
|
typedef struct texturectx_s {
|
|
struct qfv_dsmanager_s *dsmanager;
|
|
} texturectx_t;
|
|
|
|
void Vulkan_ExpandPalette (byte *dst, const byte *src, const byte *palette,
|
|
int alpha, int count);
|
|
qfv_tex_t *Vulkan_LoadTex (struct vulkan_ctx_s *ctx, tex_t *tex, int mip,
|
|
const char *name);
|
|
qfv_tex_t *Vulkan_LoadTexArray (struct vulkan_ctx_s *ctx, tex_t *tex,
|
|
int layers, int mip, const char *name);
|
|
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);
|
|
VkImageView Vulkan_TexImageView (qfv_tex_t *tex) __attribute__((pure));
|
|
void Vulkan_UpdateTex (struct vulkan_ctx_s *ctx, qfv_tex_t *tex, tex_t *src,
|
|
int x, int y, int layer, int mip);
|
|
void Vulkan_UnloadTex (struct vulkan_ctx_s *ctx, qfv_tex_t *tex);
|
|
void Vulkan_Texture_Init (struct vulkan_ctx_s *ctx);
|
|
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);
|
|
|
|
#endif//__QF_Vulkan_qf_texture_h
|