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 | |
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]>
-rw-r--r-- | src/mesa/main/enable.c | 8 | ||||
-rw-r--r-- | src/mesa/main/extensions_table.h | 1 |
2 files changed, 5 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; diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index b0492fed698..05ed418d750 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -218,6 +218,7 @@ EXT(EXT_compressed_ETC1_RGB8_sub_texture , OES_compressed_ETC1_RGB8_texture EXT(EXT_copy_image , OES_copy_image , x , x , x , 30, 2014) EXT(EXT_copy_texture , dummy_true , GLL, x , x , x , 1995) EXT(EXT_depth_bounds_test , EXT_depth_bounds_test , GLL, GLC, x , x , 2002) +EXT(EXT_depth_clamp , ARB_depth_clamp , x , x , x , ES2, 2019) EXT(EXT_discard_framebuffer , dummy_true , x , x , ES1, ES2, 2009) EXT(EXT_disjoint_timer_query , EXT_disjoint_timer_query , x , x , x , ES2, 2016) EXT(EXT_draw_buffers , dummy_true , x , x , x , ES2, 2012) |