Commit 5bf8c17f by Alexis Hetu Committed by Alexis Hétu

Added Primitive Restart Index and Rasterizer Discard to IsEnabled

Change-Id: I63f7324139ff4f337996c14380ef2862dbd8465b Reviewed-on: https://swiftshader-review.googlesource.com/3547Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent b77ded35
...@@ -4207,6 +4207,8 @@ GLboolean IsEnabled(GLenum cap) ...@@ -4207,6 +4207,8 @@ GLboolean IsEnabled(GLenum cap)
if(context) if(context)
{ {
egl::GLint clientVersion = context->getClientVersion();
switch(cap) switch(cap)
{ {
case GL_CULL_FACE: return context->isCullFaceEnabled(); case GL_CULL_FACE: return context->isCullFaceEnabled();
...@@ -4218,6 +4220,18 @@ GLboolean IsEnabled(GLenum cap) ...@@ -4218,6 +4220,18 @@ GLboolean IsEnabled(GLenum cap)
case GL_DEPTH_TEST: return context->isDepthTestEnabled(); case GL_DEPTH_TEST: return context->isDepthTestEnabled();
case GL_BLEND: return context->isBlendEnabled(); case GL_BLEND: return context->isBlendEnabled();
case GL_DITHER: return context->isDitherEnabled(); case GL_DITHER: return context->isDitherEnabled();
case GL_PRIMITIVE_RESTART_FIXED_INDEX:
if(clientVersion >= 3)
{
return context->isPrimitiveRestartFixedIndexEnabled();
}
else return error(GL_INVALID_ENUM, false);
case GL_RASTERIZER_DISCARD:
if(clientVersion >= 3)
{
return context->isRasterizerDiscardEnabled();
}
else return error(GL_INVALID_ENUM, false);
default: default:
return error(GL_INVALID_ENUM, false); return error(GL_INVALID_ENUM, false);
} }
......
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