Skip to content

Commit 5c73842

Browse files
committed
Fix source variables not properly propagating updateID
1 parent 65ce7ff commit 5c73842

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

qrenderdoc/Windows/ShaderViewer.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -2969,7 +2969,6 @@ void ShaderViewer::combineStructures(RDTreeWidgetItem *root, int skipPrefixLengt
29692969

29702970
VariableTag tag;
29712971
tag.absoluteRefPath = prefix;
2972-
parent->setTag(QVariant::fromValue(tag));
29732972

29742973
// add all the children (stripping the prefix from their name)
29752974
for(RDTreeWidgetItem *item : matches)
@@ -2982,8 +2981,15 @@ void ShaderViewer::combineStructures(RDTreeWidgetItem *root, int skipPrefixLengt
29822981
parent->setBackground(item->background());
29832982
if(item->foreground().color().isValid())
29842983
parent->setForeground(item->foreground());
2984+
2985+
VariableTag childTag = item->tag().value<VariableTag>();
2986+
2987+
// take max updateID when combining
2988+
tag.updateID = qMax(tag.updateID, childTag.updateID);
29852989
}
29862990

2991+
parent->setTag(QVariant::fromValue(tag));
2992+
29872993
// recurse and combine members of this object if a struct
29882994
if(!isLeafArray)
29892995
{
@@ -4733,7 +4739,8 @@ RDTreeWidgetItem *ShaderViewer::makeSourceVariableNode(const ShaderVariable &var
47334739
tag.absoluteRefPath = baseTag.absoluteRefPath + sep + var.name;
47344740
tag.expanded = true;
47354741
tag.modified = HasChanged(baseTag.absoluteRefPath + sep + var.name);
4736-
tag.updateID = CalcUpdateID(tag.updateID, baseTag.absoluteRefPath + sep + var.name);
4742+
tag.updateID = CalcUpdateID(tag.updateID, debugVarPath);
4743+
tag.updateID = CalcUpdateID(tag.updateID, debugName);
47374744

47384745
for(const ShaderVariable &child : var.members)
47394746
{

0 commit comments

Comments
 (0)