Fixed buffer staging
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user