mesa/src
Patrick Lerda 2ed761021f r600: make vertex r10g10b10a2_sscaled conformant on palm and beyond
This is a gl4.3 issue very similar to e8fa3b4950.

The mode r10g10b10a2_sscaled processed as vertex on palm at the
hardware level doesn't follow the current standard. Indeed, the .w
component (2-bits) is not calculated as expected. The table below
describes the situation.

This change fixes this issue by adding two gpu instructions at
the vertex fetch shader stage. An equivalent C representation and
a gpu asm dump of the generated sequence are available below.

.w(2-bits)	expected	palm		cypress
0		 0		0		 0
1		 1		1		 1
2		-2		2		-2
3		-1		3		-1

w_out = w_in - (w_in > 1. ? 4. : 0.);

0002 00000024 A0040000  ALU 2 @72
 0072 801F2C0A 600004C0     1 w:     SETGT*4                __.w,  R10.w, 1.0
 0074 839FCC0A 61400010     2 w:     ADD                    R10.w,  R10.w, -PV.w

Note: cypress returns the expected value, and does not need
this correction.

This change was tested on palm, barts and cayman. Here are the tests fixed:
khr-gl4[3-6]/vertex_attrib_binding/basic-input-case6: fail pass
khr-gles31/core/vertex_attrib_binding/basic-input-case6: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38849>
2026-01-26 13:40:22 +00:00
..
amd ac/nir/lower_ps_late: emit scalar f2f16_rtz for when one half of a packed export is undef 2026-01-26 10:54:23 +00:00
android_stub android_stub: fix missing prototypes issues 2025-12-02 20:03:02 +00:00
asahi asahi/clc: call nir_opt_remove_phis after nir_opt_loop 2026-01-26 12:02:49 +00:00
broadcom broadcom/ci: remove duplicate entries 2026-01-23 10:44:30 +00:00
c11 c11/threads: fix build on c23 2025-11-10 07:01:50 +10:00
compiler nir/opt_loop: Relax restrictions on opt_loop_peel_initial_break() for more loops 2026-01-26 12:02:49 +00:00
drm-shim drm-shim: handle DRM_CAP_ADDFB2_MODIFIERS 2025-11-24 12:34:08 +00:00
egl egl/surfaceless,device: Support RGB[A]16_UNORM formats for pbuffers. 2026-01-21 12:29:03 +00:00
etnaviv etnaviv/ci: Add gitlab-ci-inc.yml to file list 2026-01-19 20:46:38 +00:00
freedreno tu: Avoid disabling LRZ when possible for suspend/resume+depth-only draws 2026-01-26 09:48:44 +00:00
gallium r600: make vertex r10g10b10a2_sscaled conformant on palm and beyond 2026-01-26 13:40:22 +00:00
gbm gbm: Make documentation for gbm_bo_map more explicit 2025-12-29 10:05:38 +00:00
getopt
gfxstream gfxstream: fixes related to -Wmissing-prototypes 2026-01-23 18:06:01 +00:00
glx driconf: add a way to override GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 2025-12-17 23:35:24 +00:00
gtest
imagination pvr/ci: document last night's flakes 2026-01-23 19:37:20 +00:00
imgui imgui: Silence build warnings for imgui 2025-09-16 06:16:19 +00:00
intel brw: remove a redundant DCE 2026-01-25 17:17:06 -08:00
kosmickrisp kk: Use pipeline_layout.dynamic_descriptor_offset 2026-01-22 17:04:19 +00:00
loader loader: fix UB in wayland helper code. 2026-01-03 07:56:38 +00:00
mesa compiler/mesa/st: Move gl_advanced_blend_mode to util/blend.h 2026-01-24 21:44:00 +00:00
microsoft vk: descriptors: sort bindings along with flags 2026-01-20 15:55:47 +00:00
nouveau nvk/nvkmd: Do not limit exec_push count in nvkmd_nouveau_exec_ctx 2026-01-22 20:35:03 +00:00
panfrost panfrost/clc: call nir_opt_remove_phis after nir_opt_loop 2026-01-26 12:02:49 +00:00
poly panvk/csf: implement VK_EXT_primitives_generated_query primitive restart 2026-01-21 09:03:34 +00:00
tool pps/meson: minor refactor for pps_deps 2025-11-08 18:39:00 -08:00
util util/blend: Add pipe_blend_overlap_mode enum 2026-01-24 21:44:00 +00:00
virtio venus: refactor Android ANB tracking to avoid confusions with WSI 2026-01-21 23:15:42 +00:00
vulkan vulkan/wsi/wayland: use roundtrip instead of flush on swapchain free 2026-01-26 06:27:37 +00:00
x11 treewide: strip unneeded inc_gallium inc_gallium_aux 2025-11-13 22:01:43 +00:00
.clang-format util: Add sparse bitset data structure 2025-11-06 21:34:33 +00:00
meson.build kk: Add KosmicKrisp 2025-10-20 17:46:38 +00:00