2020-08-11 21:23:20 +02:00
|
|
|
#pragma once
|
2023-10-26 18:37:29 +02:00
|
|
|
#include "Graphics.h"
|
2025-05-23 16:12:33 +02:00
|
|
|
#include "Resources.h"
|
2024-06-09 12:20:04 +02:00
|
|
|
#include "Graphics/RenderTarget.h"
|
2020-03-24 21:05:32 +01:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
namespace Seele {
|
|
|
|
|
namespace Vulkan {
|
2025-05-23 16:12:33 +02:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
class RenderPass : public Gfx::RenderPass {
|
|
|
|
|
public:
|
2025-05-23 16:12:33 +02:00
|
|
|
RenderPass(PGraphics graphics, Gfx::RenderTargetLayout layout, Array<Gfx::SubPassDependency> dependencies, std::string name,
|
|
|
|
|
Array<uint32> viewMasks = {}, Array<uint32> correlationMasks = {});
|
2020-04-12 15:47:19 +02:00
|
|
|
virtual ~RenderPass();
|
2023-11-16 22:58:47 +01:00
|
|
|
uint32 getFramebufferHash();
|
2024-01-31 09:49:53 +01:00
|
|
|
void endRenderPass();
|
2025-05-23 16:12:33 +02:00
|
|
|
constexpr VkRenderPass getHandle() const { return renderPass->getHandle(); }
|
2024-06-09 12:20:04 +02:00
|
|
|
constexpr size_t getClearValueCount() const { return clearValues.size(); }
|
|
|
|
|
constexpr VkClearValue* getClearValues() const { return clearValues.data(); }
|
|
|
|
|
constexpr VkSubpassContents getSubpassContents() const { return subpassContents; }
|
2025-05-06 19:36:43 +02:00
|
|
|
constexpr const std::string& getName() const { return name; }
|
2025-05-23 16:12:33 +02:00
|
|
|
constexpr PRenderPassHandle getCommandHandle() const { return renderPass; }
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2020-04-12 15:47:19 +02:00
|
|
|
PGraphics graphics;
|
2025-05-23 16:12:33 +02:00
|
|
|
std::string name;
|
|
|
|
|
ORenderPassHandle renderPass;
|
2020-04-12 15:47:19 +02:00
|
|
|
Array<VkClearValue> clearValues;
|
|
|
|
|
VkRect2D renderArea;
|
|
|
|
|
VkSubpassContents subpassContents;
|
|
|
|
|
};
|
2021-04-01 16:40:14 +02:00
|
|
|
DEFINE_REF(RenderPass)
|
2020-04-12 15:47:19 +02:00
|
|
|
} // namespace Vulkan
|
|
|
|
|
} // namespace Seele
|