This commit is contained in:
2026-09-25 20:22:29 -07:00
parent 4ebae57cf8
commit 0d145f615d
10 changed files with 100 additions and 16 deletions
+10 -1
View File
@@ -3,6 +3,8 @@
#include <sophia/util/assert.hpp>
#include <utility>
#include "vulkan/debug_label.hpp"
namespace sophia {
ImageRef RenderGraph::importImage(Image& image, Access finalAccess) {
@@ -74,6 +76,8 @@ void RenderGraph::flush(vk::CommandBuffer commandBuffer,
}
void RenderGraph::recordPass(vk::CommandBuffer commandBuffer, Pass& pass) {
beginDebugLabel(commandBuffer, pass.name.c_str());
PendingBarriers pending;
for (const ImageUse& use : pass.uses) {
this->transitionTo(use.image, getAccessState(use.access), pending);
@@ -82,9 +86,14 @@ void RenderGraph::recordPass(vk::CommandBuffer commandBuffer, Pass& pass) {
if (pass.colorAttachments.empty()) {
pass.execute(commandBuffer);
return;
} else {
this->recordRendering(commandBuffer, pass);
}
endDebugLabel(commandBuffer);
}
void RenderGraph::recordRendering(vk::CommandBuffer commandBuffer, Pass& pass) {
std::vector<vk::RenderingAttachmentInfo> attachments;
attachments.reserve(pass.colorAttachments.size());