Add workaround for bug in the Mesa glsl optimizer
Change-Id: I23251f5288b41f5b7f86406984fdd854127797a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
9cd2dac348
commit
fde6450b59
@ -68,11 +68,8 @@ static const char fragment_shader150[] =
|
||||
"uniform sampler2D textureSampler;"
|
||||
"uniform bool swizzle;"
|
||||
"void main() {"
|
||||
" if (swizzle) {"
|
||||
" fragcolor = texture(textureSampler, uv).bgra;"
|
||||
" } else {"
|
||||
" fragcolor = texture(textureSampler,uv);"
|
||||
" }"
|
||||
" vec4 tmpFragColor = texture(textureSampler, uv);"
|
||||
" fragcolor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
|
||||
"}";
|
||||
|
||||
static const char vertex_shader[] =
|
||||
@ -91,11 +88,8 @@ static const char fragment_shader[] =
|
||||
"uniform sampler2D textureSampler;"
|
||||
"uniform bool swizzle;"
|
||||
"void main() {"
|
||||
" if (swizzle) {"
|
||||
" gl_FragColor = texture2D(textureSampler, uv).bgra;"
|
||||
" } else {"
|
||||
" gl_FragColor = texture2D(textureSampler,uv);"
|
||||
" }"
|
||||
" highp vec4 tmpFragColor = texture2D(textureSampler,uv);"
|
||||
" gl_FragColor = swizzle ? tmpFragColor.bgra : tmpFragColor;"
|
||||
"}";
|
||||
|
||||
static const GLfloat vertex_buffer_data[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user