From aca67a555c011f59c37b05544eecbeea9aa42f3e Mon Sep 17 00:00:00 2001 From: Erico Nunes Date: Wed, 9 Dec 2020 23:24:37 +0100 Subject: mesa: allow half float textures based on ARB_half_float_pixel In targets that support half float textures but not float textures (so without ARB_texture_float), the previous logic did not allow for enabling half float texture support in desktop OpenGL. OES_texture_half_float is only valid for OpenGL ES 2.0 contexts, so include ARB_half_float_pixel in the logic to cover OpenGL too. Remove _mesa_is_gles3 from the check since in case of a gles3 context, OES_texture_half_float is already assumed to be enabled. Signed-off-by: Erico Nunes Reviewed-by: Erik Faye-Lund Part-of: --- src/mesa/main/context.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index e00149aabef..b42fa40b748 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -356,7 +356,8 @@ static inline bool _mesa_has_half_float_textures(const struct gl_context *ctx) { return _mesa_has_ARB_texture_float(ctx) || - _mesa_has_OES_texture_half_float(ctx) || _mesa_is_gles3(ctx); + _mesa_has_ARB_half_float_pixel(ctx) || + _mesa_has_OES_texture_half_float(ctx); } static inline bool -- cgit v1.2.3