mesa/src/compiler
Marek Olšák 8fc640b256 nir/lower_io_to_temporaries: fix interp_deref_at_* lowering
The pass converts:
    ...
    %.. = load_deref(input)
to:
    temp = copy_deref(input) // beginning of the shader
    ...
    %.. = load_deref(temp)

If interp_deref_at_* occurs between copy_deref and load_deref,
the interp_deref_at_* lowering overwrites temp, so all future
load_deref(temp) return the result of interp_deref_at_* instead of
copy_deref, which is incorrect.

The issue manifests when the same input is used by both load_deref
and interp_deref_at_* in the same shader and when interp_deref_at_*
happens to be before load_deref.

This fixes it by using a completely new temporary for each instance
of interp_deref_at_*.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
..
clc clc: add mesa_clc tool 2024-11-01 13:25:37 -07:00
glsl glsl: use symbol table directly for builtin functions 2024-11-25 23:53:37 +00:00
isaspec build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
nir nir/lower_io_to_temporaries: fix interp_deref_at_* lowering 2024-11-26 06:50:40 +00:00
rust compiler/rust: Use std::mem::offset_of!() 2024-11-18 22:29:13 +00:00
spirv vtn: ignore SpvFunctionParameterAttributeSret 2024-11-25 15:53:31 -05: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 compiler/types: Add multisample vimage/vtexture types 2024-08-27 15:06:16 +00:00
glsl_types.h compiler: make glsl_sampler_dim available to CL 2024-11-20 16:53:51 +00:00
meson.build nak: Move bitset to compiler crate 2024-08-07 21:08:18 +00:00
shader_enums.c nir: add SYSTEM_VALUE_PIXEL_COORD 2024-11-04 12:34:30 +00:00
shader_enums.h compiler: make glsl_sampler_dim available to CL 2024-11-20 16:53:51 +00:00
shader_info.h nir: add shader_info::tess::tcs_same_invocation_inputs_read(_indirect) 2024-10-21 18:53:51 +00:00