mesa/src
Rhys Perry 8fe5aa95cb ac/nir: mask shift operands
NIR shifts are defined to truncate the shift amount to the number of bits
needed to represent the bit-size of the value shifted. LLVM treats large
shifts as poison. This fix achieves NIR semantics for shifts.

As an example, a|(b << 32), where "a" is 32bits, should produce a|b
according to NIR (because 32&31 == 0).

This caused LLVM to incorrectly optimize "(a >> c) | (b << (32 - c))" to a
u2u32(pack_64_2x32(a, b) >> c) (v_alignbit_b32), when the original NIR
should have returned "a | b" if c==0.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19966>
(cherry picked from commit 064336d359)
2022-11-28 13:01:16 -08:00
..
amd ac/nir: mask shift operands 2022-11-28 13:01:16 -08:00
android_stub
asahi agx: Fix float copyprop of neg(neg) case 2022-09-14 20:55:18 -07:00
broadcom v3dv: fix debug dump on BO free 2022-11-14 13:37:58 -08:00
c11 c11: #include <threads.h> when the os/platform provide it 2022-08-19 11:32:29 -07:00
compiler nir/lower_shader_calls: wrap only jumps rather than entire code blocks 2022-11-21 09:46:53 -08:00
drm-shim drm-shim: drop gnu99 override 2022-09-26 10:13:53 -07:00
egl meson: replace manual compiler flags with meson arguments 2022-09-14 13:58:58 -07:00
etnaviv util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
freedreno ir3/ra: Make sure we don't pick a preferred reg overflowing the file. 2022-11-14 12:00:32 -08:00
gallium etnaviv: fix tile status interaction with write mappings 2022-11-28 13:01:15 -08:00
gbm gbm: add GBM_FORMAT_[AX]BGR16161616 2022-07-27 07:27:10 +00:00
getopt
glx glx: Remove usage of USE_ELF_TLS 2022-07-29 23:59:12 +00:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Fix cdm shared reg usage reported to fw. 2022-07-29 11:37:06 +00:00
imgui
intel blorp: support negative offsets in addresses 2022-11-28 13:01:16 -08:00
loader loader: Remove usage of USE_ELF_TLS in loader.c 2022-07-29 23:59:12 +00:00
mapi glthread: call _mesa_glthread_DeleteBuffers unconditionally 2022-08-12 09:41:33 -07:00
mesa mesa: treat unsupported queries as dummies 2022-11-28 13:01:16 -08:00
microsoft microsoft/compiler: Fix PSV struct when numthreads is 0 2022-08-19 11:32:32 -07:00
nouveau nv50/ir/nir: ignore sampler for TXF/TXQ ops. 2022-11-02 12:56:01 -07:00
panfrost pan/mdg: Fix out-of-order execution 2022-11-28 13:01:16 -08:00
tool meson: replace manual compiler flags with meson arguments 2022-09-14 13:58:58 -07:00
util util/radeonsi: enable zerovram workaround for Exanima 2022-10-11 13:27:16 -07:00
virtio virgl: Report CONSTANT_BUFFER_SIZE according to GL_MAX_UNIFORM_BLOCK_SIZE 2022-10-18 09:53:54 -07:00
vulkan vk/runtime: Fix narrowing of timeline signal and wait value to u32. 2022-11-28 13:01:16 -08:00
meson.build meson: Remove usage of use_elf_tls 2022-07-29 23:59:11 +00:00