[idd] driver: use the frameSize instead of the resource size
As the resource size can be larger then the actual frame data, we need to track this seperately so that we don't waste cycles copying data the client will never use.
This commit is contained in:
1 parent
91e8440c9d
commit
9ffb800e93
3 files changed
+15
-8
No files matched your search
@@ -12,7 +12,10 @@ bool CFrameBufferResource::Init(CSwapChainProcessor * swapChain, uint8_t * base,
|
||||
|
||||
// nothing to do if the resource already exists and is large enough
|
||||
if (m_base == base && m_size >= size)
|
||||
{
|
||||
m_frameSize = size;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reset();
|
||||
|
||||
@@ -87,9 +90,10 @@ bool CFrameBufferResource::Init(CSwapChainProcessor * swapChain, uint8_t * base,
|
||||
|
||||
m_res->SetName(resName);
|
||||
|
||||
m_base = base;
|
||||
m_size = size;
|
||||
m_valid = true;
|
||||
m_base = base;
|
||||
m_size = size;
|
||||
m_frameSize = size;
|
||||
m_valid = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user