-
Notifications
You must be signed in to change notification settings - Fork 637
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
Remove unavailable debug information for high level framework based samples #1200
Conversation
Wasn't important anyway and kinda hidden Remove assert from has_component
@@ -62,7 +62,6 @@ class HPPScene : private vkb::sg::Scene | |||
} | |||
else | |||
{ | |||
assert(false); // path never passed -> Please add a type-check here! |
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.
What's wrong with this assert
? Did you encounter it?
If at all, you should replace the complete function body with just
return vkb::sg::Scene::has_component(typeid(T));
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.
The assert doesn't make sense. The function is used to check if a component is present, which should return true or false and not assert.
And yes, I did encounter it ;)
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.
And yes, I did encounter it ;)
Well, in that case, some code should be added to handle those cases.
Maybe I didn't phrase that detailed enough in the comment. The assertion is just there to not miss yet unhandled cases.
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.
But it is a function that checks if the component is there. IMO it should never assert, or I might just misunderstand the statement above.
get_debug_info().template insert<field::Vector, float>("camera_pos", pos.x, pos.y, pos.z); | ||
} | ||
} | ||
} |
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.
What's wrong with this code sequence?
Under what circumstances do you get a crash here?
Instead of just removing this block, it might be worth to improve checking here.
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.
See my description of the issue as to why I removed it. tl;dr: that information was never working, in none of the samples. Adding checks before the code would simply not run the code at all, because none of the requested components could be found.
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.
because none of the requested components could be found.
And you don't expect that to ever happen?
Instead, I would prefer to have the checks extended.
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.
Yes, I have tested with all samples and not a single one had those working. Aside, the debug information removed with this PR is pretty useless anyway.
@asuessenbach: As discussed during the call, this only happens with sample using the high level framework (based on the scenegraph). Those are most of the samples in the performance folder, eg. afbc, command_buffer_usage, msaa, subpasses. A simply right click in those causes an exception. |
No longer necessary with #1203 |
Description
The high level framework based samples have a kinda hidden debug overlay activated with right click (on desktop). It shows some general debug information. This was broken (not sure when that did happen) and would crash every time you tried to toggle that debug overlay. This was caused by the scene graph not finding some components and also not checking if those are present. While fixing this, I noticed that those components weren't available in any of those samples so I simply removed the block. Also removed a wrong assert in the has_component check.
We may want to start thinking on how to simplify the high level framework. Debugging and fixing anything in that framework is tedious.
Fixes #1176
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batch
command line argument to make sure all samples still work properly