From 632092396679967a71fa3d256e18909196141de5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 12 Nov 2020 17:04:43 +0000 Subject: [PATCH] When VB stride is 0 read enough data for any single attribute --- qrenderdoc/Windows/BufferViewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qrenderdoc/Windows/BufferViewer.cpp b/qrenderdoc/Windows/BufferViewer.cpp index bac3edb31..67083e725 100644 --- a/qrenderdoc/Windows/BufferViewer.cpp +++ b/qrenderdoc/Windows/BufferViewer.cpp @@ -1749,6 +1749,11 @@ static void RT_FetchMeshData(IReplayController *r, ICaptureContext &ctx, Populat { uint64_t readBytes = qMax(maxIdx, maxIdx + 1) * vb.byteStride + maxAttrOffset; + // if the stride is 0, allow reading at most one float4. This will still get clamped by the + // declared vertex buffer size below + if(vb.byteStride == 0) + readBytes += 16; + offset *= vb.byteStride; if(vb.byteSize > offset)