When VB stride is 0 read enough data for any single attribute

This commit is contained in:
baldurk
2020-11-12 17:04:43 +00:00
parent 1375a17682
commit 6320923966
+5
View File
@@ -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)