snes9x/vulkan/vulkan_pipeline_image.hpp
BearOso 259dfd07ae Vulkan support.
Gtk port support. Breaks other platforms.
2023-03-07 13:58:21 -06:00

37 lines
942 B
C++

#pragma once
#include "vulkan_context.hpp"
namespace Vulkan
{
struct PipelineImage
{
PipelineImage();
void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator);
void init(Vulkan::Context *context);
~PipelineImage();
void create(int width, int height, vk::Format fmt, vk::RenderPass renderpass, bool mipmap = false);
void destroy();
void barrier(vk::CommandBuffer cmd);
void generate_mipmaps(vk::CommandBuffer cmd);
void clear(vk::CommandBuffer cmd);
vk::ImageView image_view;
vk::ImageView mipless_view;
vk::Image image;
vk::Format format;
vk::UniqueFramebuffer framebuffer;
vma::Allocation image_allocation;
vk::ImageLayout current_layout;
int image_width;
int image_height;
bool mipmap;
vk::Device device;
vk::Queue queue;
vk::CommandPool command_pool;
vma::Allocator allocator;
};
} // namespace Vulkan