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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 01:43:21 UTC 2021


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Jan 12 13:59:14 2021 -0800

Revert "mesa: allow half float textures based on ARB_half_float_pixel"

This reverts commit aca67a555c011f59c37b05544eecbeea9aa42f3e, which
regressed the following Piglit test on i915 (and presumably r200):

   piglit/spec/!opengl 1.1/sized-texture-format-channels

Specifically, it begins testing glTexImage2D with format GL_RGBA,
type GL_FLOAT, and internalFormat GL_RGB16F, which leads to the
following error:

   Mesa 21.0.0-devel implementation error: unexpected format GL_RGB16F in _mesa_choose_tex_format()
   Please report at https://gitlab.freedesktop.org/mesa/mesa/-/issues
   sized-texture-format-channels: ../../src/mesa/main/teximage.c:2836: _mesa_choose_texture_format: Assertion `f != MESA_FORMAT_NONE' failed.

i915 and r200 unconditionally support ARB_half_float_pixel, but neither
support RGB16F as an internal format.  According to Ian's rationale
in the commit message for 1edca151a00134778b959366d5e7c0a3b63cc8f7
(which enabled that extension for all drivers):

    "This extension only adds data types that can be passed to, for
     example, glTexImage2D.  It does not add internal formats.  Since
     you can already pass GL_FLOAT to glTexImage2D this shouldn't pose
     any additional issues with those drivers.  Note that r200 and i915
     already supported this extension, and they don't support
     floating-point textures either."

So, commit aca67a55c011 enabled half-float internal formats on hardware
that cannot support them.  We should revert the change.

v2: Don't reintroduce the _mesa_is_gles3() condition, as that shouldn't
    be necessary (feedback from Erik Faye-Lund).

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Erico Nunes <nunes.erico at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8458>

---

 src/mesa/main/context.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index b42fa40b748..9ffd75fbae3 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -356,7 +356,6 @@ static inline bool
 _mesa_has_half_float_textures(const struct gl_context *ctx)
 {
    return _mesa_has_ARB_texture_float(ctx) ||
-          _mesa_has_ARB_half_float_pixel(ctx) ||
           _mesa_has_OES_texture_half_float(ctx);
 }
 



More information about the mesa-commit mailing list