mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 13:45:55 +00:00
Fix exporting large raw buffers at an offset.
This commit is contained in:
committed by
Baldur Karlsson
parent
87a3a56c8f
commit
814d764df7
@@ -6413,10 +6413,10 @@ void BufferViewer::exportData(const BufferExport ¶ms)
|
||||
ResourceId buff = m_BufferID;
|
||||
|
||||
static const uint64_t maxChunkSize = 4 * 1024 * 1024;
|
||||
for(uint64_t byteOffset = m_ByteOffset; byteOffset < m_ByteSize;
|
||||
for(uint64_t byteOffset = m_ByteOffset; byteOffset < m_ByteSize + m_ByteOffset;
|
||||
byteOffset += maxChunkSize)
|
||||
{
|
||||
uint64_t chunkSize = qMin(m_ByteSize - byteOffset, maxChunkSize);
|
||||
uint64_t chunkSize = qMin(m_ByteOffset + m_ByteSize - byteOffset, maxChunkSize);
|
||||
|
||||
// it's fine to block invoke, because this is on the export thread
|
||||
m_Ctx.Replay().BlockInvoke([buff, f, byteOffset, chunkSize](IReplayController *r) {
|
||||
|
||||
Reference in New Issue
Block a user