mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 10:00:22 +01:00
Inspired by a commit message in !30934, I set about optimizing the code generated for nir_copysign. It would be possible to just implement an opt_algebraic pattern for the specific values used by nir_copysign, but this casts a slightly larger net. As noted in a comment in the code, there may be variations of the pattern that this pass misses. The opt_algebraic pattern would miss them too. v2: Use nir_def_replace. Suggested by Alyssa. Allow more "root" instruction types. Suggested by Georg. v3: Treat extract_u16(x, 0) as (x & 0x0000ffff), and treat extract_u8(x, 0) as (x & 0x000000ff). v4: Use nir_scalar. Suggested by Georg. Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006> |
||
|---|---|---|
| .. | ||
| clc | ||
| glsl | ||
| isaspec | ||
| nir | ||
| rust | ||
| spirv | ||
| builtin_types.py | ||
| builtin_types_c.py | ||
| builtin_types_h.py | ||
| glsl_types.c | ||
| glsl_types.h | ||
| meson.build | ||
| shader_enums.c | ||
| shader_enums.h | ||
| shader_info.h | ||