[virglrenderer-devel] [PATCH] renderer: do not set CUBE_MAP_SEAMLESS parameter on GLES

ramin.azarmehr at gmail.com ramin.azarmehr at gmail.com
Wed Jun 13 20:23:08 UTC 2018


From: Ramin Azarmehr <ramin.azarmehr at gmail.com>

Setting the sampler parameter GL_TEXTURE_CUBE_MAP_SEAMLESS in GLES generates a GL_INVALID_ENUM error.
This patch completes the previously committed patch 241b88ac8cb3f30d01b63cec9b90f8dd57839772.
---
 src/vrend_renderer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index aded005..4b9fe66 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -1298,12 +1298,12 @@ int vrend_create_sampler_state(struct vrend_context *ctx,
       glSamplerParameterf(state->id, GL_TEXTURE_MAX_LOD, templ->max_lod);
       glSamplerParameteri(state->id, GL_TEXTURE_COMPARE_MODE, templ->compare_mode ? GL_COMPARE_R_TO_TEXTURE : GL_NONE);
       glSamplerParameteri(state->id, GL_TEXTURE_COMPARE_FUNC, GL_NEVER + templ->compare_func);
-      glSamplerParameteri(state->id, GL_TEXTURE_CUBE_MAP_SEAMLESS, templ->seamless_cube_map);
       if (vrend_state.use_gles) {
          if (templ->lod_bias != 0.0f) {
             report_gles_warn(ctx, GLES_WARN_LOD_BIAS, 0);
          }
       } else {
+         glSamplerParameteri(state->id, GL_TEXTURE_CUBE_MAP_SEAMLESS, templ->seamless_cube_map);
          glSamplerParameterf(state->id, GL_TEXTURE_LOD_BIAS, templ->lod_bias);
       }
 
-- 
2.17.1



More information about the virglrenderer-devel mailing list