mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 22:54:16 +01:00
[dxvk] Simplify render pass barriers after clears
This wasn't really doing what we intended.
This commit is contained in:
parent
b9c56e3e97
commit
2089426420
@ -1765,20 +1765,16 @@ namespace dxvk {
|
|||||||
|
|
||||||
ops.depthOps = depthOp;
|
ops.depthOps = depthOp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ops.barrier.srcStages = clearStages;
|
||||||
|
ops.barrier.srcAccess = clearAccess;
|
||||||
|
ops.barrier.dstStages = imageView->imageInfo().stages;
|
||||||
|
ops.barrier.dstAccess = imageView->imageInfo().access;
|
||||||
|
|
||||||
this->renderPassBindFramebuffer(
|
this->renderPassBindFramebuffer(
|
||||||
m_device->createFramebuffer(attachments),
|
m_device->createFramebuffer(attachments),
|
||||||
ops, 1, &clearValue);
|
ops, 1, &clearValue);
|
||||||
this->renderPassUnbindFramebuffer();
|
this->renderPassUnbindFramebuffer();
|
||||||
|
|
||||||
m_execBarriers.accessImage(
|
|
||||||
imageView->image(),
|
|
||||||
imageView->imageSubresources(),
|
|
||||||
imageView->imageInfo().layout,
|
|
||||||
clearStages, clearAccess,
|
|
||||||
imageView->imageInfo().layout,
|
|
||||||
imageView->imageInfo().stages,
|
|
||||||
imageView->imageInfo().access);
|
|
||||||
} else if (m_flags.test(DxvkContextFlag::GpRenderPassBound)) {
|
} else if (m_flags.test(DxvkContextFlag::GpRenderPassBound)) {
|
||||||
// Clear the attachment in quesion. For color images,
|
// Clear the attachment in quesion. For color images,
|
||||||
// the attachment index for the current subpass is
|
// the attachment index for the current subpass is
|
||||||
@ -2686,20 +2682,16 @@ namespace dxvk {
|
|||||||
ops.depthOps.storeLayout = imageView->imageInfo().layout;
|
ops.depthOps.storeLayout = imageView->imageInfo().layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ops.barrier.srcStages = clearStages;
|
||||||
|
ops.barrier.srcAccess = clearAccess;
|
||||||
|
ops.barrier.dstStages = imageView->imageInfo().stages;
|
||||||
|
ops.barrier.dstAccess = imageView->imageInfo().access;
|
||||||
|
|
||||||
// We cannot leverage render pass clears
|
// We cannot leverage render pass clears
|
||||||
// because we clear only part of the view
|
// because we clear only part of the view
|
||||||
this->renderPassBindFramebuffer(
|
this->renderPassBindFramebuffer(
|
||||||
m_device->createFramebuffer(attachments),
|
m_device->createFramebuffer(attachments),
|
||||||
ops, 0, nullptr);
|
ops, 0, nullptr);
|
||||||
|
|
||||||
m_execBarriers.accessImage(
|
|
||||||
imageView->image(),
|
|
||||||
imageView->imageSubresources(),
|
|
||||||
imageView->imageInfo().layout,
|
|
||||||
clearStages, clearAccess,
|
|
||||||
imageView->imageInfo().layout,
|
|
||||||
imageView->imageInfo().stages,
|
|
||||||
imageView->imageInfo().access);
|
|
||||||
} else {
|
} else {
|
||||||
// Make sure the render pass is active so
|
// Make sure the render pass is active so
|
||||||
// that we can actually perform the clear
|
// that we can actually perform the clear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user