mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-29 17:52:18 +01:00
[dxvk] Introduce flushSharedImages
Fixes problems with images not being cleared prior to presentation if the clear is the last command issued in the frame.
This commit is contained in:
parent
895b19c746
commit
0f5e126735
@ -66,10 +66,7 @@ namespace dxvk {
|
||||
|
||||
Rc<DxvkCommandList> DxvkContext::endRecording() {
|
||||
this->spillRenderPass(true);
|
||||
|
||||
// Ensure that any shared images are in their
|
||||
// default layout for the next submission
|
||||
this->transitionRenderTargetLayouts(m_execBarriers, true);
|
||||
this->flushSharedImages();
|
||||
|
||||
m_sdmaBarriers.recordCommands(m_cmd);
|
||||
m_initBarriers.recordCommands(m_cmd);
|
||||
@ -1938,6 +1935,20 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::flushSharedImages() {
|
||||
for (auto i = m_deferredClears.begin(); i != m_deferredClears.end(); ) {
|
||||
if (i->imageView->imageInfo().shared) {
|
||||
this->performClear(i->imageView, -1, i->discardAspects, i->clearAspects, i->clearValue);
|
||||
i = m_deferredClears.erase(i);
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
this->transitionRenderTargetLayouts(m_execBarriers, true);
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::updateBuffer(
|
||||
const Rc<DxvkBuffer>& buffer,
|
||||
VkDeviceSize offset,
|
||||
|
@ -1139,6 +1139,8 @@ namespace dxvk {
|
||||
void flushClears(
|
||||
bool useRenderPass);
|
||||
|
||||
void flushSharedImages();
|
||||
|
||||
void startRenderPass();
|
||||
void spillRenderPass(bool suspend);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user