mesa/src/compiler
Alejandro Piñeiro 142311258d nir: aliasing checks should be also done with index != 0
Right now the aliasing/overlapping checks are only done with index
0. I guess that was done because variables don't get a different
internal location even if you have a different index.

But doing that, the checks would not detect a case like this:
  layout(location = 0, index = 1) out vec4 color;
  layout(location = 0, index = 1) out vec4 factor;

That was used on the following piglit parser test:
spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag

And as the spec included on that test, is a link error case:

" * if more than one varying out variable is bound to the same
    number and index; or"

This commit executes the aliasing checks for index 1 too, and moves
the skip down, to only skip if the current variable and all previous
location-assigned variables has different index and location.

The bad news is that now such assigned variables need to be tracked on
OpenGL-ES. Before that commit that was avoided.

With this commit the mentioned parser test properly fails to link in
any driver.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33093>
2025-02-27 15:10:52 +00:00
..
clc treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00
glsl nir: aliasing checks should be also done with index != 0 2025-02-27 15:10:52 +00:00
isaspec build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
libcl libcl/vk: add common query copy write routine 2025-02-13 11:50:06 +00:00
nir nir/lower_phis_to_scalar: don't create moves for undef sources 2025-02-27 13:18:14 +00:00
rust compiler/rust/bitset: Test next_unset() 2025-01-02 20:52:48 +00:00
spirv spirv: fix racy build 2025-02-26 23:09:51 +00:00
builtin_types.py compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
glsl_types.c glsl: fix glsl_get_word_size_align_bytes 2025-01-06 22:09:49 +00:00
glsl_types.h docs,src: replace doc and comments for PIPE_CAP with pipe_caps 2025-01-17 04:39:47 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: add load_front_face_fsign 2024-12-30 22:31:34 +00:00
shader_enums.h nir: Rename in-bounds-agx to in-bounds 2025-02-19 09:54:11 +00:00
shader_info.h nir: track lowered image intrinsics to globals 2025-02-23 15:16:50 +00:00