Process packing rules when parsing formatting strings

* Instead of having a global tight/non-tight we now let the format string
  specify the packing rules (defaulting to scalar - i.e. tight packing as
  before), and use the resulting properties to calculate packing.
This commit is contained in:
baldurk
2022-05-20 13:37:26 +01:00
parent 7abe72be6b
commit 4dc7b3f8b7
4 changed files with 278 additions and 137 deletions
+2 -2
View File
@@ -2672,7 +2672,7 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
else
{
QString errors;
ShaderConstant constant = BufferFormatter::ParseFormatString(m_Format, m_ByteSize, true, errors);
ShaderConstant constant = BufferFormatter::ParseFormatString(m_Format, m_ByteSize, errors);
UnrollConstant(constant, bufdata->vsinConfig.columns, bufdata->vsinConfig.props);
@@ -4175,7 +4175,7 @@ void BufferViewer::processFormat(const QString &format)
BufferConfiguration bufconfig;
ShaderConstant cols = BufferFormatter::ParseFormatString(format, m_ByteSize, true, errors);
ShaderConstant cols = BufferFormatter::ParseFormatString(format, m_ByteSize, errors);
CalcColumnWidth(MaxNumRows(cols));