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

Support Sampler binding in the shader. #471

Merged
merged 1 commit into from Jul 18, 2014

Conversation

Sonicadvance1
Copy link
Contributor

In the cases where we support the binding layout keyword, use it for more than binding UBO location.
This changes it so it is supported for samplers as well.

Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.

@Sonicadvance1
Copy link
Contributor Author

Wondering actually if the SAMPLER_BINDING should be renamed to LAYOUT_BINDING since it can be used for vertex attribute binding in the shader in the future.

@@ -63,7 +63,7 @@ void SHADER::SetProgramVariables()
// glsl shader must be bind to set samplers
Bind();

This comment was marked as off-topic.

@degasus
Copy link
Member

degasus commented Jun 7, 2014

Woo, thanks for doing my work :) :)

In the cases where we support the binding layout keyword, use it for more than binding UBO location.
This changes it so it is supported for samplers as well.

Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.
@Sonicadvance1
Copy link
Contributor Author

We no longer call Bind in SetProgramVariables when we support binding layouts.
It's not needed with binding, and later in code when we actually use the shader we call Bind when needed.

Also rebased on latest master.
Removing the hack define in textureconversionshader is outside of the scope of this PR.
This should be good for merging.

@degasus
Copy link
Member

degasus commented Jul 18, 2014

LGTM

delroth added a commit that referenced this pull request Jul 18, 2014
Support Sampler binding in the shader.
@delroth delroth merged commit 5646ffd into dolphin-emu:master Jul 18, 2014
Bind();

// Bind UBO
// Bind UBO and texture samplers
if (!g_ActiveConfig.backend_info.bSupportsBindingLayout)

This comment was marked as off-topic.

@Sonicadvance1 Sonicadvance1 deleted the sampler_binding branch July 19, 2014 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants