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

SW backend: make shaders work on Intel/Windows. #227

Merged
merged 1 commit into from Apr 2, 2014

Conversation

magumagu
Copy link
Contributor

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. :)

@delroth
Copy link
Member

delroth commented Mar 29, 2014

@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.

@Sonicadvance1
Copy link
Contributor

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.

This comment was marked as off-topic.

@Sonicadvance1
Copy link
Contributor

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.
@Sonicadvance1
Copy link
Contributor

LGTM if it actually fixes the issue in Windows.

@magumagu
Copy link
Contributor Author

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).

@Sonicadvance1
Copy link
Contributor

Yea, #ifdef will work fine.

@magumagu
Copy link
Contributor Author

magumagu commented Apr 2, 2014

This is ready to be merged.

Sonicadvance1 added a commit that referenced this pull request Apr 2, 2014
SW backend: make shaders work on Intel/Windows.
@Sonicadvance1 Sonicadvance1 merged commit ca9ee35 into dolphin-emu:master Apr 2, 2014
@magumagu magumagu deleted the swbackend-fix-shaders branch April 2, 2014 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants