mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-02 00:52:56 +00:00
21b4862460
* music system improvements * Zip64 support * fixes for menu scaling on ultrawide screens * Mac default paths fixed * lightmap code (not active 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, int baseMipLevel = 0, int levelCount = 1);
|
|
void execute(VulkanCommandBuffer *cmdbuffer);
|
|
|
|
private:
|
|
PipelineBarrier barrier;
|
|
VkPipelineStageFlags srcStageMask = 0;
|
|
VkPipelineStageFlags dstStageMask = 0;
|
|
bool needbarrier = false;
|
|
};
|