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
SW backend: make shaders work on Intel/Windows. #227
SW backend: make shaders work on Intel/Windows. #227
Conversation
|
@Sonicadvance1 @degasus this one is for you to review :) |
| @@ -258,6 +260,7 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height) | |||
| glDrawArrays(GL_TRIANGLE_FAN, 0, 4); | |||
| glDisableVertexAttribArray(attr_pos); | |||
| glDisableVertexAttribArray(attr_tex); | |||
| glUseProgram(0); | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Yep, what degasus said. |
| @@ -51,18 +51,22 @@ void SWRenderer::Shutdown() | |||
| void CreateShaders() | |||
| { | |||
| static const char *fragShaderText = | |||
| "#if GL_ES\n" | |||
| #if USE_EGL | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Why does the shader fail to compile on Windows with Intel drivers that we require GLSL 1.20? |
Apparently the Intel shader compiler doesn't implement "#if" correctly... so use "#ifdef" instead.
|
LGTM if it actually fixes the issue in Windows. |
|
The "#version" thing isn't necessary; chalk it up to me being stupid. Updated patch with just switching from #if to #ifdef (which should be okay, I hope). |
|
Yea, #ifdef will work fine. |
|
This is ready to be merged. |
SW backend: make shaders work on Intel/Windows.
A couple of minor tweaks so the Intel drivers on Windows don't reject
the shaders, and actually draw something. So much nicer than
using "take screenshot" to see what's on the screen. :)