-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Sorting array members in the Watch and High Level Variables window #3755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I just noticed that high level variables when they are built in like (gl_MeshVerticesEXT) are also |
ba28be8 to
95e8efa
Compare
Zorro666
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fixes. I have noticed these problems before but it was never a priority to chase down.
I tested the fixes on DXIL and Spirv debugging and they worked very nicely.
Just one thing before the final approval.
Please could you edit the commit message description to remove what looks like the same information repeated a few times and please could it mention that the commit also fixes the sorting order in the "High Level Variables" windows for arrays.
You can force push your branch with the edited commit message to ensure a clean history of a single commit.
After your PR is merged I might copy the existing two duplicated pieces of code for sorting to use a common sort function to keep consistency of sorting in the watch window and combineStructures.
i.e. the current commit message
This sets the offset of the VariableTag for array members in the watch
window. This ensures they are sorted correctly when displayed.
Sorting array members in the watch window correctly
This sets the offset of the VariableTag for array members in the watch
window. This ensures they are sorted correctly when displayed.
Sorting array members in the watch window correctly
This sets the offset of the VariableTag for array members in the watch
window. This ensures they are sorted correctly when displayed.```
This sets the offset of the VariableTag for array members in the watch window. This ensures they are sorted correctly when displayed. This also adds sorting by sourceVarIdx if the memebers are globalSourceVars which fixes the sorting in the High Level Variables window for built-in Variables
95e8efa to
abf3760
Compare
I did not notice that at all! should be fixed.
I went ahead and did that. Hopefully this saves you a PR :) |
Zorro666
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the iteration on the PR including adding the common helper function for sorting.




Description
When adding an array variable to the Watch window the VariableTag of the members do not have offsets so when they are sorted they are sorted by text which causes
[2]to show after[10]:Before:

After:

I'm not 100% sure if this is correct or not. Its worth noting that the High Level Variables
tab does have this sorted correctly and the member
offsetis set to the index of the member. At leastfrom just a cursory look. So this is just copying that behavior.
Same variable in the High Level Variables tab.
