mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 18:00:54 +00:00
Fix exporting large raw buffers at an offset.
This commit is contained in:
1 parent
87a3a56c8f
commit
814d764df7
1 file changed
+2
-2
@@ -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