mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-21 22:16:38 +00:00
Fix issue with clamped length with byte offset in buffer viewer
This commit is contained in:
@@ -2579,16 +2579,17 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
uint64_t unclampedLen = m_ByteSize;
|
||||
if(unclampedLen == UINT64_MAX)
|
||||
{
|
||||
uint64_t bufLen =
|
||||
unclampedLen =
|
||||
m_IsBuffer && m_BufferID != ResourceId() ? m_Ctx.GetBuffer(m_BufferID)->length : 0;
|
||||
uint64_t bufOffs = m_ByteOffset;
|
||||
|
||||
if(bufOffs >= bufLen)
|
||||
unclampedLen = 0;
|
||||
else
|
||||
unclampedLen = bufLen - bufOffs;
|
||||
}
|
||||
|
||||
uint64_t bufOffs = m_ByteOffset;
|
||||
|
||||
if(bufOffs >= unclampedLen)
|
||||
unclampedLen = 0;
|
||||
else
|
||||
unclampedLen = unclampedLen - bufOffs;
|
||||
|
||||
unclampedLen -= m_PagingByteOffset;
|
||||
|
||||
uint64_t clampedLen = qMin(unclampedLen, uint64_t(buf->stride * (MaxVisibleRows + 2)));
|
||||
|
||||
Reference in New Issue
Block a user