aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-02-25 12:58:35 +0100
committerErik Faye-Lund <[email protected]>2020-04-01 12:57:57 +0200
commit541708680f471eb3bd984bdecca7ba36fe12f0aa (patch)
tree0662fe7c03ab253ddac95866f268f4f34374fa78 /src/mesa/main/enable.c
parente2dbd31dc0eb69f3a1df262842635c6ff8103d84 (diff)
mesa/main: clean up extension-check for AMD_depth_clamp_separate
Signed-off-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/329>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 50a809ebf64..a5a69a3a68a 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1116,9 +1116,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
break;
case GL_DEPTH_CLAMP_NEAR_AMD:
- if (!_mesa_is_desktop_gl(ctx))
+ if (!_mesa_has_AMD_depth_clamp_separate(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION(AMD_depth_clamp_separate);
if (ctx->Transform.DepthClampNear == state)
return;
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepthClamp ? 0 :
@@ -1128,9 +1127,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
break;
case GL_DEPTH_CLAMP_FAR_AMD:
- if (!_mesa_is_desktop_gl(ctx))
+ if (!_mesa_has_AMD_depth_clamp_separate(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION(AMD_depth_clamp_separate);
if (ctx->Transform.DepthClampFar == state)
return;
FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepthClamp ? 0 :
@@ -1854,15 +1852,13 @@ _mesa_IsEnabled( GLenum cap )
ctx->Transform.DepthClampFar;
case GL_DEPTH_CLAMP_NEAR_AMD:
- if (!_mesa_is_desktop_gl(ctx))
+ if (!_mesa_has_AMD_depth_clamp_separate(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION(AMD_depth_clamp_separate);
return ctx->Transform.DepthClampNear;
case GL_DEPTH_CLAMP_FAR_AMD:
- if (!_mesa_is_desktop_gl(ctx))
+ if (!_mesa_has_AMD_depth_clamp_separate(ctx))
goto invalid_enum_error;
- CHECK_EXTENSION(AMD_depth_clamp_separate);
return ctx->Transform.DepthClampFar;
case GL_FRAGMENT_SHADER_ATI: