renderer: do not set CUBE_MAP_SEAMLESS parameter on GLES

Setting the sampler parameter GL_TEXTURE_CUBE_MAP_SEAMLESS in GLES generates a GL_INVALID_ENUM error.
This patch completes the previously committed patch 241b88ac8c.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Ramin Azarmehr 6 years ago committed by Dave Airlie
parent 50eaefdb71
commit 805d69e168
  1. 2
      src/vrend_renderer.c

@ -1358,12 +1358,12 @@ int vrend_create_sampler_state(struct vrend_context *ctx,
glSamplerParameterf(state->id, GL_TEXTURE_MAX_LOD, templ->max_lod); 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_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_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 (vrend_state.use_gles) {
if (templ->lod_bias != 0.0f) { if (templ->lod_bias != 0.0f) {
report_gles_warn(ctx, GLES_WARN_LOD_BIAS, 0); report_gles_warn(ctx, GLES_WARN_LOD_BIAS, 0);
} }
} else { } else {
glSamplerParameteri(state->id, GL_TEXTURE_CUBE_MAP_SEAMLESS, templ->seamless_cube_map);
glSamplerParameterf(state->id, GL_TEXTURE_LOD_BIAS, templ->lod_bias); glSamplerParameterf(state->id, GL_TEXTURE_LOD_BIAS, templ->lod_bias);
} }

Loading…
Cancel
Save