mesa/src
Rhys Perry 78a07aa90b 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-30 21:12:43 +00:00
..
amd ac/nir: mask shift operands 2022-11-30 21:12:43 +00:00
android_stub
asahi asahi: Identify counts for compute kernels 2022-10-29 19:23:51 +00:00
broadcom v3d(v): account for debug flags when using the cache 2022-11-23 19:11:59 +00:00
c11 c11: Getting the macro guard of HAVE_PTHREAD in c11/threads.h to be consistence with util/u_uthread.h 2022-10-20 03:04:56 +00:00
compiler nir/divergence: add missing btd_shader_type_intel 2022-11-23 19:12:00 +00:00
drm-shim drm-shim: drop gnu99 override 2022-09-16 02:06:38 +00:00
egl Revert "egl/glx: add fallback for zink loading" 2022-11-17 14:05:05 +00:00
etnaviv util/mesa/wide: Rename _SIMPLE_MTX_INITIALIZER_NP to SIMPLE_MTX_INITIALIZER 2022-10-14 03:27:41 +00:00
freedreno freedreno/ci: Skip civilization-v/CivilizationV-trim trace 2022-11-17 14:05:04 +00:00
gallium virgl: Fix injection of double from const mov instruction 2022-11-30 21:12:42 +00:00
gbm utils: Merge util/debug.* into util/u_debug.* and remove util/debug.* 2022-11-02 07:25:39 +00:00
getopt
glx Revert "egl/glx: add fallback for zink loading" 2022-11-17 14:05:05 +00:00
gtest
hgl
imagination nir: Drop infer_non_readable option for nir_opt_access() 2022-11-02 03:42:04 +00:00
imgui
intel anv: generate correct addresses for state pool offsets 2022-11-23 19:12:00 +00:00
loader loader/dri3: Add DRI performance option to wait for next buffer on swap 2022-10-25 08:30:35 +00:00
mapi meson: Refactoring shared gen_vs_module_defs_normal_command out 2022-11-17 14:05:02 +00:00
mesa mesa: treat unsupported queries as dummies 2022-11-30 21:12:42 +00:00
microsoft utils: Merge util/debug.* into util/u_debug.* and remove util/debug.* 2022-11-02 07:25:39 +00:00
nouveau nv50/ir/nir: ignore sampler for TXF/TXQ ops. 2022-11-02 12:29:34 +00:00
panfrost panfrost: Revert "Require 64-byte alignment on imports" 2022-11-30 21:12:42 +00:00
tool pps: enable track_event in intel.cfg 2022-10-09 22:39:53 +03:00
util util: include sys/time.h for timespec functions 2022-11-17 14:05:05 +00:00
virtio venus: enable VK_KHR_push_descriptor 2022-11-30 21:12:42 +00:00
vulkan vk/runtime: Fix narrowing of timeline signal and wait value to u32. 2022-11-23 19:12:00 +00:00
meson.build meson: Remove usage of use_elf_tls 2022-07-29 23:59:11 +00:00