diff options
author | Gert Wollny <[email protected]> | 2019-01-02 15:44:33 +0100 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-02-25 09:44:27 +0000 |
commit | 875942c059433950fd2de23445f20b85b1074512 (patch) | |
tree | 1c9ac30c036a69bfc3db3eaf5f941a2e9704b326 /src/mesa/main/enable.c | |
parent | b45186a6cd0ed7539e427d4443671faef9f95058 (diff) |
mesa/core: Enable EXT_depth_clamp for GLES >= 2.0
The extension NV_depth_clamp is written against OpenGL 1.2.1, and
since GLES 2.0 is based on GL 2.0 there is no reason not to enable
this extension also for GLES >= 2.0.
v2: Use EXT_depth_clamp that has been proposed to Khronos
v3: - Fix check for extension availability (Erik Faya-Lund)
- Also fix the test in is_enabled
v4: - Test both, ARB and EXT extension (Erik)
v5: - Fix white space errors (Erik)
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Erik Faye-Lund <[email protected]>
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index b5e59b77751..386556edeed 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1004,9 +1004,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; case GL_DEPTH_CLAMP: - if (!_mesa_is_desktop_gl(ctx)) + if (!_mesa_has_ARB_depth_clamp(ctx) && + !_mesa_has_EXT_depth_clamp(ctx)) goto invalid_enum_error; - CHECK_EXTENSION(ARB_depth_clamp, cap); if (ctx->Transform.DepthClampNear == state && ctx->Transform.DepthClampFar == state) return; @@ -1704,9 +1704,9 @@ _mesa_IsEnabled( GLenum cap ) /* GL_ARB_depth_clamp */ case GL_DEPTH_CLAMP: - if (!_mesa_is_desktop_gl(ctx)) + if (!_mesa_has_ARB_depth_clamp(ctx) && + !_mesa_has_EXT_depth_clamp(ctx)) goto invalid_enum_error; - CHECK_EXTENSION(ARB_depth_clamp); return ctx->Transform.DepthClampNear || ctx->Transform.DepthClampFar; |