mesa/src
Alyssa Rosenzweig bf3027c391 mesa/st: Normalize wrap modes for seamless cubes
The OpenGL specification requires that seamless cube maps ignore the wrap mode,
but some hardware may try to respect the wrap mode even for seamless cubes
contrary to the spec. Since OpenGL maps samplers 1:1 to textures (at least
without bindless texture support...), it's easy to override the wrap mode for
seamless cubes to something that works for the hardware.

I'm not sure if there is value in gating this behaviour behind a CAP. On one
hand, there is a tiny bit of extra CPU overhead added to change samplers. On the
other hand, normalizing wrap modes might improve CSO caching, and normalizing to
a non-BORDER mode avoids the expensive border colour code later in the function.

We will need a different workaround in our Vulkan driver. Potentially, we'll
have to duplicate *every* sampler to have a cubemap version and a non-cubemap
version, selecting a sampler in the shader based on the texture opcode. That
sucks and implementing it would depend on subtle details of how we implement
descriptor sets, so it's not like we would share that code with the GL driver
anyway. In the mean time, let's get this right for GL without the performance
hit of duplication.

Fixes dEQP-GLES3.functional.texture.filtering.cube.* on Asahi, as well as a
smattering of dEQP-GLES31.functional.texture.filtering.cube_array.* fails on
softpipe.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.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>
2023-03-28 21:30:12 +00:00
..
amd ac/nir: add ac_nir_lower_ps 2023-03-28 19:57:11 +00:00
android_stub util/log: improve logger_android 2023-02-22 17:55:40 +00:00
asahi asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
broadcom v3dv: fix format swizzle for buffer views 2023-03-27 20:16:04 +00:00
c11
compiler nir: add nir_fisnan helper function 2023-03-28 19:57:11 +00:00
drm-shim drm-shim: Use hide_drm_device_path() to hide other drm devices 2022-12-30 15:51:11 -08:00
egl egl: don't expose swrast device if swrast is not built 2023-03-22 18:23:37 +00:00
etnaviv ci/etnaviv: Get the gc2000_piglit manual job mostly working. 2023-03-21 23:46:13 +00:00
freedreno freedreno/registers: Add control reg for zap fw base 2023-03-25 16:21:28 +00:00
gallium mesa/st: Normalize wrap modes for seamless cubes 2023-03-28 21:30:12 +00:00
gbm gbm: drop unnecessary vulkan dependency 2023-02-23 18:31:22 +00:00
getopt
glx glx: fix memory leak related to __glXCloseDisplay() 2023-03-20 21:12:54 +00:00
gtest
imagination pvr: Add robustness buffer support 2023-03-27 18:36:32 +00:00
imgui
intel intel: Allocate mesh shader URB space before task shader 2023-03-28 19:25:34 +00:00
loader loader: Use libdrm shim 2023-03-05 16:31:51 +00:00
mapi mesa ctx->API --> _mesa_is_foo(ctx) 2023-03-20 06:39:57 +00:00
mesa mesa/st: Normalize wrap modes for seamless cubes 2023-03-28 21:30:12 +00:00
microsoft dzn: Use mesa_loge for DXIL validation errors 2023-03-23 21:48:44 +00:00
nouveau nouveau: Make getSize return unsigned int 2023-03-17 16:08:33 +00:00
panfrost mesa/st: Only set seamless for GLES3 2023-03-28 21:30:12 +00:00
tool pps: Fix build errors. 2023-03-13 01:22:46 +00:00
util driconf: add a workaround for Kaiju-A-Gogo 2023-03-28 20:35:11 +00:00
virtio venus: check and configure new ringMonitoring feature 2023-03-24 23:27:53 +00:00
vulkan vulkan: vk_android.c should be copyright Intel 2023-03-26 00:16:26 +00:00
meson.build hgl: remove 2023-02-18 00:44:43 +00:00