Skip to content
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

minor fixes and additions #905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Slaw6820
Copy link

During my work with apitrace I have encountered a small number of issues that were addressed with the following changes to the source code.
Please review.

@okias
Copy link
Contributor

okias commented Jan 1, 2024

Hello @Slaw6820

thank you for the contribution, could you split the one commit into the separate changes?

@Slaw6820
Copy link
Author

Slaw6820 commented Jan 2, 2024

Sure. Does it mean that all proposed fixes are accepted?
Should I create multiple changes under one PR or separate PRs?

@okias
Copy link
Contributor

okias commented Jan 2, 2024

Sure. Does it mean that all proposed fixes are accepted? Should I create multiple changes under one PR or separate PRs?

LTGM, but I'm not an biggest authority here :) just commits within this MR :)

@Slaw6820
Copy link
Author

Slaw6820 commented Jan 5, 2024

@jrfonseca

Copy link
Member

@jrfonseca jrfonseca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the silence -- I was on vacation last week.

Thanks for the changes. Comments inline.

Otherwise looks good. I agree it would be good to break the changes according to main modules (wrappers, retrace, etc. The main reason is that one can git bisect and revert chunks

api < other.api ||
core < other.core ||
forwardCompatible < other.forwardCompatible;
return (major < other.major) ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

There's a more compact way to achieve the same:

        if (major != other.major) {
            return major < other.major;
        }
        if (minor != other.minor) {
            return minor < other.minor;
        }
        ...

@@ -221,7 +221,16 @@ OpenGLImpl::skipDeleteObj(const trace::Call& call)
map = &m_textures;

if (!strcmp(call.name(), "glDeleteFramebuffers"))
map = &m_current_context->m_fbo;
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code formatting should be

    if (condition) {
        ....
    }

#endif


#define assert(expression) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

@jrfonseca jrfonseca added the Further Work Needed For PRs which need more work. label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Further Work Needed For PRs which need more work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants