mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-15 07:01:15 +00:00
611dad7f69
Not hooked up yet.
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
|
|
#pragma once
|
|
|
|
#include "vulkan/system/vk_objects.h"
|
|
#include "vulkan/system/vk_builders.h"
|
|
#include "vulkan/renderer/vk_renderpass.h"
|
|
|
|
class VkTextureImage
|
|
{
|
|
public:
|
|
void reset()
|
|
{
|
|
AspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
|
Layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
PPFramebuffer.reset();
|
|
RSFramebuffers.clear();
|
|
DepthOnlyView.reset();
|
|
View.reset();
|
|
Image.reset();
|
|
}
|
|
|
|
void GenerateMipmaps(VulkanCommandBuffer *cmdbuffer);
|
|
|
|
std::unique_ptr<VulkanImage> Image;
|
|
std::unique_ptr<VulkanImageView> View;
|
|
std::unique_ptr<VulkanImageView> DepthOnlyView;
|
|
VkImageLayout Layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
VkImageAspectFlags AspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
|
std::unique_ptr<VulkanFramebuffer> PPFramebuffer;
|
|
std::map<VkRenderPassKey, std::unique_ptr<VulkanFramebuffer>> RSFramebuffers;
|
|
};
|
|
|
|
class VkImageTransition
|
|
{
|
|
public:
|
|
void addImage(VkTextureImage *image, VkImageLayout targetLayout, bool undefinedSrcLayout);
|
|
void execute(VulkanCommandBuffer *cmdbuffer);
|
|
|
|
private:
|
|
PipelineBarrier barrier;
|
|
VkPipelineStageFlags srcStageMask = 0;
|
|
VkPipelineStageFlags dstStageMask = 0;
|
|
bool needbarrier = false;
|
|
};
|