Skip to content

Commit

Permalink
gl: add GLSL precision qualifier to image tests.
Browse files Browse the repository at this point in the history
Add "precision" qualifier to image tests when generating the shaders
for gles with TEXTURE_EXTERNAL_OES, otherwise the shader won't compile.

TEST=Ran gl_unittests on samus

Review-Url: https://codereview.chromium.org/2266173002
Cr-Commit-Position: refs/heads/master@{#413641}
  • Loading branch information
DCastagna authored and Commit bot committed Aug 23, 2016
1 parent 816d433 commit 1e2b483
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/gl/test/gl_image_test_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ GLuint LoadFragmentShader(unsigned target, const gfx::Size& size) {
return GLHelper::LoadShader(
GL_FRAGMENT_SHADER,
base::StringPrintf("#extension GL_OES_EGL_image_external : require\n"
"%s" // precision
"#define SamplerType samplerExternalOES\n"
"#define TextureLookup texture2D\n"
"#define TextureScale vec2(1.0, 1.0)\n"
"%s", // main function
is_gles ? "precision mediump float;\n" : "",
fragment_shader_main.c_str())
.c_str());
default:
Expand Down

0 comments on commit 1e2b483

Please sign in to comment.