Mesa (master): mesa: allow half float textures based on ARB_half_float_pixel

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 11 21:31:37 UTC 2020


Module: Mesa
Branch: master
Commit: aca67a555c011f59c37b05544eecbeea9aa42f3e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aca67a555c011f59c37b05544eecbeea9aa42f3e

Author: Erico Nunes <nunes.erico at gmail.com>
Date:   Wed Dec  9 23:24:37 2020 +0100

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 at gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8020>

---

 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



More information about the mesa-commit mailing list