[virglrenderer-devel] [PATCH] vrend: Do not use GL_DEPTH_CLAMP on GLES
Jakob Bornecrantz
jakob at collabora.com
Thu May 10 09:49:34 UTC 2018
GLES doesn't have this, just ignore it as it we warn about it
on the regular state submission path.
Signed-off-by: Jakob Bornecrantz <jakob at collabora.com>
---
src/vrend_renderer.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 3e52166..4b1793a 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -2486,8 +2486,9 @@ void vrend_clear(struct vrend_context *ctx,
} else {
glClearDepth(depth);
}
- if (!ctx->sub->hw_rs_state.depth_clip)
- glDisable(GL_DEPTH_CLAMP);
+ if (!ctx->sub->hw_rs_state.depth_clip && !vrend_state.use_gles) {
+ glDisable(GL_DEPTH_CLAMP);
+ }
}
if (buffers & PIPE_CLEAR_STENCIL) {
@@ -2541,8 +2542,9 @@ void vrend_clear(struct vrend_context *ctx,
if (buffers & PIPE_CLEAR_DEPTH) {
if (!ctx->sub->dsa_state.depth.writemask)
glDepthMask(GL_FALSE);
- if (!ctx->sub->hw_rs_state.depth_clip)
- glEnable(GL_DEPTH_CLAMP);
+ if (!ctx->sub->hw_rs_state.depth_clip && !vrend_state.use_gles) {
+ glEnable(GL_DEPTH_CLAMP);
+ }
}
/* Restore previous stencil buffer write masks for both front and back faces */
--
2.14.1
More information about the virglrenderer-devel
mailing list