-
Notifications
You must be signed in to change notification settings - Fork 1
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
Review #4
base: empty
Are you sure you want to change the base?
Review #4
Conversation
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.
Review from @pent0.
Notes: Const where possible. C++ compiler certainly can optimize things better.
} | ||
} | ||
|
||
std::string getVaryingName(ProgramVarying varying) { |
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.
std::string getVaryingName(ProgramVarying varying) {
const char *
will be better. You are constructing heap memory... What if you want to useconst char *
but not string somewhere in future.- Try to stick with built-in type whenever you can.
bool isStruct(); | ||
}; | ||
|
||
class CompilerGXP : public Compiler { |
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 design is in a way unfriendly with future optimization like another layer of IR.
- Another layer of IR maybe needed because the USSE ops have many opcodes that can optimize SPIRV to the very end.
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.
I agree. I'm not really aware of any other methods though. I started reading the dragon book a few days ago, it might have a better idea?
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.
I don't even have it, so idk... Go with your instics.. Personally I try and error and figure out what is better, than copy code from somewhere and make it better... Though this optimization is hard to do. We can keep this note for now.
Updated to latest :) |
No description provided.