Commit 996314b4 by Nicolas Capens

Reject GLSL ES 3.00 shaders for OpenGL ES 2.0 contexts.

Bug 19331817 Change-Id: I72128c6b3cb672d4b74578086814fde2c2c6db99 Reviewed-on: https://swiftshader-review.googlesource.com/2292Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent a68b6112
......@@ -214,11 +214,20 @@ void Shader::compile()
serial++;
}
int shaderVersion = compiler->getShaderVersion();
int clientVersion = es2::getContext()->getClientVersion();
if(shaderVersion >= 300 && clientVersion < 3)
{
infoLog = "GLSL ES 3.00 is not supported by OpenGL ES 2.0 contexts";
success = false;
}
if(!success)
{
deleteShader();
infoLog = compiler->getInfoSink().info.c_str();
infoLog += compiler->getInfoSink().info.c_str();
TRACE("\n%s", infoLog.c_str());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment