mesa/st: Only set seamless for GLES3
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 24 Mar 2023 22:18:26 +0000 (18:18 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 28 Mar 2023 21:30:12 +0000 (21:30 +0000)
commitf2506780c8a9c2b65336f7556d6ae802ea156e5b
treee000a4eff9f386036ccc5322301299e59b022ec3
parent1646f7d977ab7ef6c6925495e9990eda356cb15d
mesa/st: Only set seamless for GLES3

6148e3aae7e ("mesa: Fix ctx->Texture.CubeMapSeamless") introduced a hack, where
seamless cube maps would be requested even for GLES2 contexts despite the spec,
on the assumption that GLES2 gallium drivers would ignore the bit. But that
requires Gallium drivers to know what GLES version they advertise, which is a
horrible layering violation. When the commit was written 8 years ago, there were
classic drivers to contend with so it made sense as a fix to get GLES 3.0 up and
running. With classic drivers gone, it's time to sunset the hack and restore the
intended behaviour by setting ctx->Texture.CubeMapSeamless only once we know the
version.

In addition to fixing a semantic issue in the Gallium contract and preventing a
regression from the next commit, this fixes cube maps on Mali-T720 under
Panfrost. In general, Panfrost supports GLES3 (and honours the seamless flag
everywhere) but on T720 we only advertise GLES2 due to missing MRT support on
older Midgard devices, so we need the flag set properly to distinguish these
cases.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21978>
src/mesa/main/texstate.c
src/mesa/main/version.c
src/panfrost/ci/panfrost-t720-fails.txt