diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 29c325b..b8efaef 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3246,14 +3246,17 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims, /* In case of HALF_FLOAT_OES or FLOAT_OES, find corresponding sized * internal floating point format for the given base format. */ - if (_mesa_is_gles(ctx) && format == internalFormat) { - if (type == GL_FLOAT) { - texObj->_IsFloat = GL_TRUE; - } else if (type == GL_HALF_FLOAT_OES || type == GL_HALF_FLOAT) { - texObj->_IsHalfFloat = GL_TRUE; - } + if (ctx->Extensions.OES_texture_float || + ctx->Extensions.OES_texture_half_float) { + if (ctx->API == API_OPENGLES2 && format == internalFormat) { + if (type == GL_FLOAT) { + texObj->_IsFloat = GL_TRUE; + } else if (type == GL_HALF_FLOAT_OES || type == GL_HALF_FLOAT) { + texObj->_IsHalfFloat = GL_TRUE; + } - internalFormat = adjust_for_oes_float_texture(format, type); + internalFormat = adjust_for_oes_float_texture(format, type); + } } texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,