mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 07:56:33 +00:00
Fix handling of buffer truncation and zero-sized buffers
This commit is contained in:
@@ -136,7 +136,9 @@ void ConstantBufferPreviewer::OnEventChanged(uint32_t eventId)
|
||||
if(!m_formatOverride.type.members.empty())
|
||||
{
|
||||
m_Ctx.Replay().AsyncInvoke([this, offset, size, wasEmpty](IReplayController *r) {
|
||||
bytebuf data = r->GetBufferData(m_cbuffer, offset, size);
|
||||
bytebuf data;
|
||||
if(size > 0)
|
||||
data = r->GetBufferData(m_cbuffer, offset, size);
|
||||
rdcarray<ShaderVariable> vars = applyFormatOverride(data);
|
||||
GUIInvoke::call(this, [this, vars, wasEmpty] {
|
||||
RDTreeViewExpansionState state;
|
||||
@@ -279,7 +281,7 @@ void ConstantBufferPreviewer::processFormat(const QString &format)
|
||||
{
|
||||
QString errors;
|
||||
|
||||
m_formatOverride = BufferFormatter::ParseFormatString(format, 0, false, errors);
|
||||
m_formatOverride = BufferFormatter::ParseFormatString(format, ~0ULL, false, errors);
|
||||
ui->formatSpecifier->setErrors(errors);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user