Tweak initial-skipping logic. Don't skip square RTs

* I don't know if this is particularly justified, but I think square RTs
  are much more likely to be 'data' RTs updated each frame, not leftover
  frame data that will be overwritten. That I know of, there are no
  square resolution output displays (they're always portrait or
  landscape and rectangular).
This commit is contained in:
baldurk
2015-07-06 15:20:43 +02:00
parent cffad15781
commit 351b04d499
+7 -3
View File
@@ -1602,9 +1602,13 @@ bool WrappedID3D11Device::Serialise_InitialState(ID3D11DeviceChild *res)
SERIALISE_ELEMENT(uint32_t, numSubresources, desc.MipLevels*desc.ArraySize);
bool bigrt = ((desc.BindFlags & D3D11_BIND_RENDER_TARGET) != 0 ||
(desc.BindFlags & D3D11_BIND_DEPTH_STENCIL) != 0 ||
(desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS) != 0) && (desc.Width > 64 && desc.Height > 64);
bool bigrt = (
(desc.BindFlags & D3D11_BIND_RENDER_TARGET) != 0 ||
(desc.BindFlags & D3D11_BIND_DEPTH_STENCIL) != 0 ||
(desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS) != 0
) &&
(desc.Width > 64 && desc.Height > 64) &&
(desc.Width != desc.Height);
if(bigrt && m_ResourceManager->ReadBeforeWrite(Id))
bigrt = false;