diff options
author | Erico Nunes <nunes.erico@gmail.com> | 2020-12-09 23:24:37 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-12-11 21:14:30 +0000 |
commit | aca67a555c011f59c37b05544eecbeea9aa42f3e (patch) | |
tree | d4acd0d6ab621dd512771499b1b4267ff0586dad | |
parent | 456b57802eaf95d36e7b950bdb5ffd86a1c0dc63 (diff) |
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 <nunes.erico@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8020>
-rw-r--r-- | src/mesa/main/context.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 |