From 84a804f95d4423c333f64e1d04df64bf99d893ec Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 28 Apr 2020 14:53:25 +0100 Subject: [PATCH] Set byte strides for error case of buffer formatter --- qrenderdoc/Code/BufferFormatter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qrenderdoc/Code/BufferFormatter.cpp b/qrenderdoc/Code/BufferFormatter.cpp index a0aa46c48..4a448b024 100644 --- a/qrenderdoc/Code/BufferFormatter.cpp +++ b/qrenderdoc/Code/BufferFormatter.cpp @@ -459,6 +459,9 @@ ShaderConstant BufferFormatter::ParseFormatString(const QString &formatString, u if(maxLen > 0 && maxLen < 4) el.type.descriptor.type = VarType::UByte; + el.type.descriptor.arrayByteStride = el.type.descriptor.matrixByteStride = + el.type.descriptor.columns * VarTypeByteSize(el.type.descriptor.type); + SetInterpretedResourceFormat(el, ResourceFormatType::Regular, CompType::Typeless); root.structDef.type.members.push_back(el);