Fixed buffer staging

This commit is contained in:
Dynamitos
2024-06-13 22:47:51 +02:00
parent 42b4d43a6d
commit ac135eebd0
22 changed files with 380 additions and 406 deletions
@@ -45,11 +45,7 @@ CachedDepthPass::~CachedDepthPass() {}
void CachedDepthPass::beginFrame(const Component::Camera& cam) { RenderPass::beginFrame(cam); }
uint64 numFragments = 0;
void CachedDepthPass::render() {
occlusionQuery->resetQuery();
occlusionQuery->beginQuery();
graphics->beginRenderPass(renderPass);
Array<Gfx::ORenderCommand> commands;
@@ -145,14 +141,11 @@ void CachedDepthPass::render() {
graphics->executeCommands(std::move(commands));
graphics->endRenderPass();
occlusionQuery->endQuery();
numFragments = occlusionQuery->getResults();
}
void CachedDepthPass::endFrame() {}
void CachedDepthPass::publishOutputs() {
occlusionQuery = graphics->createOcclusionQuery();
// If we render to a part of an image, the depth buffer itself must
// still match the size of the whole image or their coordinate systems go out of sync
TextureCreateInfo depthBufferInfo = {