mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
mesa/main: correct extension-checks for GL_PRIMITIVE_RESTART_FIXED_INDEX
This shouldn't be allowed in GLES 1/2. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
34ade0dc7c
commit
b9e9d701dc
1 changed files with 2 additions and 3 deletions
|
|
@ -1108,7 +1108,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_PRIMITIVE_RESTART_FIXED_INDEX:
|
case GL_PRIMITIVE_RESTART_FIXED_INDEX:
|
||||||
if (!_mesa_is_gles3(ctx) && !ctx->Extensions.ARB_ES3_compatibility)
|
if (!_mesa_is_gles3(ctx) && !_mesa_has_ARB_ES3_compatibility(ctx))
|
||||||
goto invalid_enum_error;
|
goto invalid_enum_error;
|
||||||
if (ctx->Array.PrimitiveRestartFixedIndex != state) {
|
if (ctx->Array.PrimitiveRestartFixedIndex != state) {
|
||||||
FLUSH_VERTICES(ctx, 0);
|
FLUSH_VERTICES(ctx, 0);
|
||||||
|
|
@ -1739,9 +1739,8 @@ _mesa_IsEnabled( GLenum cap )
|
||||||
return ctx->Array.PrimitiveRestart;
|
return ctx->Array.PrimitiveRestart;
|
||||||
|
|
||||||
case GL_PRIMITIVE_RESTART_FIXED_INDEX:
|
case GL_PRIMITIVE_RESTART_FIXED_INDEX:
|
||||||
if (!_mesa_is_gles3(ctx) && !ctx->Extensions.ARB_ES3_compatibility) {
|
if (!_mesa_is_gles3(ctx) && !_mesa_has_ARB_ES3_compatibility(ctx))
|
||||||
goto invalid_enum_error;
|
goto invalid_enum_error;
|
||||||
}
|
|
||||||
return ctx->Array.PrimitiveRestartFixedIndex;
|
return ctx->Array.PrimitiveRestartFixedIndex;
|
||||||
|
|
||||||
/* GL3.0 - GL_framebuffer_sRGB */
|
/* GL3.0 - GL_framebuffer_sRGB */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue