Skip to content

fix: batch shading compiler directives were wrong #2015

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

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

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Aug 3, 2025

I spotted two places where we used a nonexistent OSL_GCCVERSION macro. This is never defined.

In platform.h, I think it's a simple typo and should be OSL_GNUC_VERSION, which is the macro we actually use to hold the GCC version, or 0 if it's not being compiled by GCC.

In wide_opcolor.cpp, it's odder and seems like also a cut-and-paste error. At the very least it should be OSL_CLANG_VERSION since it's part of a clause that also tests that clang < 14.0.

I spotted two places where we used a *nonexistant* OSL_GCCVERSION
macro. This is never defined.

In platform.h, I think it's a simple typo and should be
OSL_GNUC_VERSION, which is the macro we actually use to hold the GCC
version, or 0 if it's not being compiled by GCC.

In wide_opcolor.cpp, it's odder and seems like also a cut-and-paste
error. At the very least it should be OSL_CLANG_VERSION since it's
part of a clause that also tests that clang < 14.0. But upon staring
at it, I can't help but wonder if this spot should *also* have a
clause `OSL_GNUC_VERSION ||` to make this simd loop macro work properly
for GCC, as it did in the other one in platform.h?

And should the one in platform.h include clang, or no?

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz requested a review from AlexMWells August 3, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant