2021-11-21 22:40:11 +01:00
|
|
|
#pragma once
|
|
|
|
#include "vk_core.h"
|
2022-01-09 20:14:44 +01:00
|
|
|
#include "vk_devmem.h"
|
2021-11-21 22:40:11 +01:00
|
|
|
|
|
|
|
typedef struct {
|
2022-01-09 20:14:44 +01:00
|
|
|
vk_devmem_t devmem;
|
2021-11-21 22:40:11 +01:00
|
|
|
VkImage image;
|
|
|
|
VkImageView view;
|
|
|
|
|
|
|
|
uint32_t width, height;
|
|
|
|
int mips;
|
|
|
|
} xvk_image_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const char *debug_name;
|
|
|
|
uint32_t width, height;
|
2021-11-21 23:53:51 +01:00
|
|
|
int mips, layers;
|
2021-11-21 22:40:11 +01:00
|
|
|
VkFormat format;
|
|
|
|
VkImageTiling tiling;
|
|
|
|
VkImageUsageFlags usage;
|
|
|
|
qboolean has_alpha;
|
2021-11-21 23:53:51 +01:00
|
|
|
qboolean is_cubemap;
|
2022-02-05 22:31:04 +01:00
|
|
|
VkMemoryPropertyFlags memory_props;
|
2021-11-21 22:40:11 +01:00
|
|
|
} xvk_image_create_t;
|
|
|
|
|
|
|
|
xvk_image_t XVK_ImageCreate(const xvk_image_create_t *create);
|
|
|
|
void XVK_ImageDestroy(xvk_image_t *img);
|
2022-08-27 20:39:29 +02:00
|
|
|
|
|
|
|
void R_VkImageClear(VkCommandBuffer cmdbuf, VkImage image);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
VkPipelineStageFlags in_stage;
|
|
|
|
struct {
|
|
|
|
VkImage image;
|
|
|
|
int width, height;
|
|
|
|
VkImageLayout oldLayout;
|
|
|
|
VkAccessFlags srcAccessMask;
|
|
|
|
} src, dst;
|
|
|
|
} r_vkimage_blit_args;
|
|
|
|
|
|
|
|
void R_VkImageBlit( VkCommandBuffer cmdbuf, const r_vkimage_blit_args *blit_args );
|
|
|
|
|