-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support vectorized Select in OpenGLCompute backend #6371
Support vectorized Select in OpenGLCompute backend #6371
Conversation
The ternary operator in GLSL does not work with vector types. While the mix function have overloads to boolean vectors, it is only supported in version 4.5, so it is not exactly portable. To work around this, we use the ternary operator on all elements of the vector type. Necessary for halide#6348.
Is there a test case that exercises this? If not, this PR should add one. |
@steven-johnson Any pointers on how tests for OpenGLCompute should be added? I saw #5627, so I assumed that's is not possible at the moment. |
Yikes -- I had forgotten we weren't testing these. Not sure if the issues ever got addressed. @shoaibkamil, do you remember the issues here? |
Yes, the issues are related to having two different LLVMs included: one within libhalide, and the other within the OpenGL runtime, both (I believe) having public symbol visibility. @alexreinking had some ideas on how to make this work using cmake, I believe, and may have more info. I can look into it again later this week, depending on what Alex thinks the right way to do this via cmake is. |
I thought this was solved (on macOS/Linux) by #5659? Is that not the case? |
Thanks for the reminder, I'll check locally to ensure this is fixed and then try to get it working on the buildbot as well. |
OK, since OGLC testing is temporarily busted, go ahead and land this without a test, we'll figure it out later. |
The ternary operator in GLSL does not work with vector types. While the
mix function have overloads to boolean vectors, it is only supported in
version 4.5, so it is not exactly portable. To work around this, we use
the ternary operator on all elements of the vector type.
Necessary for #6348.