Display matrix memory order in cbuffer type column. Refs #800

This commit is contained in:
baldurk committed 2018-02-19 11:53:20 +00:00
1 parent 41112d10e5
commit 2eb56e4279
9 files changed
+41 -21

No files matched your search

+10 -5
View File
@@ -187,10 +187,12 @@ struct ShaderVariable
return type < o.type;
if(!(displayAsHex == o.displayAsHex))
return displayAsHex < o.displayAsHex;
if(memcmp(&value, &o.value, sizeof(value)) < 0)
return true;
if(!(isStruct == o.isStruct))
return isStruct < o.isStruct;
if(!(rowMajor == o.rowMajor))
return rowMajor < o.rowMajor;
if(memcmp(&value, &o.value, sizeof(value)) < 0)
return true;
if(!(members == o.members))
return members < o.members;
return false;
@@ -206,15 +208,18 @@ struct ShaderVariable
DOCUMENT("The :class:`basic type <VarType>` of this variable.");
VarType type;
DOCUMENT("``True`` if the contents of this variable should be displayed as hex.");
bool displayAsHex;
DOCUMENT("The :class:`contents <ShaderValue>` of this variable if it has no members.");
ShaderValue value;
DOCUMENT("``True`` if the contents of this variable should be displayed as hex.");
bool displayAsHex;
DOCUMENT("``True`` if this variable is a structure and not an array or basic type.");
bool isStruct;
DOCUMENT("``True`` if this variable is stored in rows in memory. Only relevant for matrices.");
bool rowMajor;
DOCUMENT("The members of this variable as a list of :class:`ShaderValue`.");
rdcarray<ShaderVariable> members;
};