1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-13 19:29:14 +01:00

[d3d9] Mark non default resources as dirty by default

This commit is contained in:
Robin Kertels 2021-03-19 04:28:47 +01:00 committed by Joshie
parent 8159e87331
commit dba7525954
3 changed files with 11 additions and 1 deletions

View File

@ -14,6 +14,9 @@ namespace dxvk {
m_stagingBuffer = CreateStagingBuffer();
m_sliceHandle = GetMapBuffer()->getSliceHandle();
if (m_desc.Pool != D3DPOOL_DEFAULT)
m_dirtyRange = D3D9Range(0, m_desc.Size);
}

View File

@ -21,6 +21,13 @@ namespace dxvk {
AddDirtyBox(nullptr, i);
}
if (m_desc.Pool != D3DPOOL_DEFAULT) {
const uint32_t subresources = CountSubresources();
for (uint32_t i = 0; i < subresources; i++) {
SetNeedsUpload(i, true);
}
}
m_mapping = pDevice->LookupFormat(m_desc.Format);
m_mapMode = DetermineMapMode();

View File

@ -5008,7 +5008,7 @@ namespace dxvk {
void D3D9DeviceEx::UploadManagedTexture(D3D9CommonTexture* pResource) {
for (uint32_t subresource = 0; subresource < pResource->CountSubresources(); subresource++) {
if (!pResource->NeedsUpload(subresource))
if (!pResource->NeedsUpload(subresource) || pResource->GetBuffer(subresource) == nullptr)
continue;
this->FlushImage(pResource, subresource);