vrend: Ignore GL_TEXTURE_LOD_BIAS on GLES.

glSamplerParameter doesn't support GL_TEXTURE_LOD_BIAS on GLES.
Ignore it on GLES backends.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Lepton Wu 5 years ago
parent 7d204f3927
commit 660ed37239
  1. 6
      src/vrend_renderer.c

@ -1947,7 +1947,11 @@ int vrend_create_sampler_state(struct vrend_context *ctx,
glSamplerParameterf(state->ids[i], GL_TEXTURE_MAX_LOD, templ->max_lod);
glSamplerParameteri(state->ids[i], GL_TEXTURE_COMPARE_MODE, templ->compare_mode ? GL_COMPARE_R_TO_TEXTURE : GL_NONE);
glSamplerParameteri(state->ids[i], GL_TEXTURE_COMPARE_FUNC, GL_NEVER + templ->compare_func);
glSamplerParameterf(state->ids[i], GL_TEXTURE_LOD_BIAS, templ->lod_bias);
if (vrend_state.use_gles) {
if (templ->lod_bias)
report_gles_warn(ctx, GLES_WARN_LOD_BIAS);
} else
glSamplerParameterf(state->ids[i], GL_TEXTURE_LOD_BIAS, templ->lod_bias);
if (vrend_state.use_gles) {
if (templ->seamless_cube_map != 0) {

Loading…
Cancel
Save