mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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() {
|
Rc<DxvkCommandList> DxvkContext::endRecording() {
|
||||||
this->spillRenderPass(true);
|
this->spillRenderPass(true);
|
||||||
|
this->flushSharedImages();
|
||||||
// Ensure that any shared images are in their
|
|
||||||
// default layout for the next submission
|
|
||||||
this->transitionRenderTargetLayouts(m_execBarriers, true);
|
|
||||||
|
|
||||||
m_sdmaBarriers.recordCommands(m_cmd);
|
m_sdmaBarriers.recordCommands(m_cmd);
|
||||||
m_initBarriers.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(
|
void DxvkContext::updateBuffer(
|
||||||
const Rc<DxvkBuffer>& buffer,
|
const Rc<DxvkBuffer>& buffer,
|
||||||
VkDeviceSize offset,
|
VkDeviceSize offset,
|
||||||
|
@ -1139,6 +1139,8 @@ namespace dxvk {
|
|||||||
void flushClears(
|
void flushClears(
|
||||||
bool useRenderPass);
|
bool useRenderPass);
|
||||||
|
|
||||||
|
void flushSharedImages();
|
||||||
|
|
||||||
void startRenderPass();
|
void startRenderPass();
|
||||||
void spillRenderPass(bool suspend);
|
void spillRenderPass(bool suspend);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user