Commit graph

9350 commits

Author SHA1 Message Date
Karol Herbst
d9d398e652 clc: allow debug flag to be read from other files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26524>
2023-12-05 22:45:53 +00:00
Alyssa Rosenzweig
65e431e61a nir/lower_idiv: Optimize idiv sign calculation
Save a comparison, and move out the comparison to be more backend friendly.
Saves 2 instrs on AGX (as the remaining comparison now fuses with bcsel).

Results on AGX, all affected shaders in asphalt9.

   total instructions in shared programs: 1813003 -> 1812611 (-0.02%)
   instructions in affected programs: 119646 -> 119254 (-0.33%)
   helped: 333
   HURT: 0
   Instructions are helped.

   total bytes in shared programs: 11870344 -> 11867208 (-0.03%)
   bytes in affected programs: 820888 -> 817752 (-0.38%)
   helped: 333
   HURT: 0
   Bytes are helped.

and on Mali-G57:

   total instructions in shared programs: 2677538 -> 2677205 (-0.01%)
   instructions in affected programs: 206923 -> 206590 (-0.16%)
   helped: 333
   HURT: 0
   Instructions are helped.

   total cvt in shared programs: 14667.50 -> 14662.30 (-0.04%)
   cvt in affected programs: 1953.64 -> 1948.44 (-0.27%)
   helped: 333
   HURT: 0
   Cvt are helped.

   total quadwords in shared programs: 1450664 -> 1450544 (<.01%)
   quadwords in affected programs: 5064 -> 4944 (-2.37%)
   helped: 15
   HURT: 0
   Quadwords are helped.

   total threads in shared programs: 53282 -> 53309 (0.05%)
   threads in affected programs: 27 -> 54 (100.00%)
   helped: 27
   HURT: 0
   Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26489>
2023-12-05 21:46:26 +00:00
Faith Ekstrand
eda940c855 nak: Make barriers SSA-friendly
The NIR intrinsics now take and return a barrier whenever one is
modified instead of modifying in-place.  In NAK, we give the internal
instructions the same treatment and convert everything to use barrier
SSA values and RegRefs.  In nak_from_nir, we move all barriers to/from
GPRs.  We'll clean up the massive pile of OpBMov later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26463>
2023-12-05 18:59:40 +00:00
Yonggang Luo
a9a2eabea8 glsl: move glsl_get_gl_type into glsl/linker_util.h
glsl_get_gl_type only accessed in src/compiler/glsl files, do not expose it
in libcompiler

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25879>
2023-12-05 16:16:55 +00:00
Rob Clark
d05e81fa7f isaspec: Sort labels with same output
In order to get stable results from qsort() across different versions of
libc, toolchain, etc., sort labels with the same offset alphabetically.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10217
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26399>
2023-12-05 00:42:09 +00:00
Alyssa Rosenzweig
d7f0804a47 nir/format_convert: handle clamping smaller bit sizes
asahi will pass in 16bits, works fine if we convert before clamping. note we
don't try to be clever and make a smaller immediate because it would require
extra logic for negatives to make sure we don't have garbage in upper bits
(nir_validate checks that). do the simple, obviously correct thing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26440>
2023-12-04 15:41:19 +00:00
Qiang Yu
b16017d080 nir: fix load layer id system_values_read info gather
Otherwise radeons+ACO compilation fail.

Fixes: 32ee6376ad ("nir: add lowering from FS LAYER input to LAYER_ID sysval")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26422>
2023-12-01 03:17:57 +00:00
Timothy Arceri
57acffbba8 glsl: remove GLSL IR lower_named_interface_blocks()
We now use a NIR based lowering pass instead.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26001>
2023-11-30 03:45:08 +00:00
Timothy Arceri
cdf0ed8960 glsl: use the nir based lower_named_interface_blocks()
Because we are now doing the lowering in NIR we need to move the code
that sets the compact flag on some builtin vars out of the glsl to nir
pass.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26001>
2023-11-30 03:45:07 +00:00
Timothy Arceri
bedf504d38 glsl: add nir based lower_named_interface_blocks()
This will be used in the following patch to replace the GLSL IR
version of this pass.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26001>
2023-11-30 03:45:07 +00:00
Konstantin Seurer
827b0fa1ef nir/lower_vars_to_scratch: Remove all unused derefs
If the shader passed to nir_lower_vars_to_scratch contains some unused
derefs to a variable that will be lowered, validation will fail because
the variable is not part of the shader after the pass.

cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26271>
2023-11-29 06:49:48 +00:00
Alyssa Rosenzweig
e14633fa7d nir/lower_tex: Add 1D lowering
From amd/common.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26377>
2023-11-28 20:32:03 +00:00
Marek Olšák
b6e98677c3 nir/print: print PATCH0 and VARn_16BIT names instead of numbers for TCS and TES
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26275>
2023-11-25 09:50:19 -05:00
Marek Olšák
5c8730ebe8 nir: don't declare illegal varyings in nir_create_passthrough_tcs
I called it accidentally with LAYER.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26275>
2023-11-25 09:50:19 -05:00
Marek Olšák
7a9b73fcb8 nir: fix gathering TESS_LEVEL_INNER/OUTER usage with lowered IO
Those varyings shouldn't flag patch_inputs_read/patch_outputs_written.

Fixes: 10be706778 - nir: gather indirect info from lowered IO intrinsics

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26275>
2023-11-25 09:50:19 -05:00
Marek Olšák
27a9ddad28 nir: return progress from nir_remove_sysval_output
Changing IO semantics doesn't affect the SSA structure.

Same as nir_remove_varying.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26274>
2023-11-24 15:37:24 +00:00
Marek Olšák
32ee6376ad nir: add lowering from FS LAYER input to LAYER_ID sysval
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26274>
2023-11-24 15:37:24 +00:00
Timothy Arceri
1b7107efe4 glsl: drop ir_binop_ubo_load
This was missed in e566b54a59

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26330>
2023-11-22 22:17:17 +00:00
Marek Olšák
2f0ed0680c glsl/nir: return failure from link_varyings if there is a linker error
Some linker errors are set very deep inside link_varyings. Don't return
a success if we can't continue.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26310>
2023-11-22 18:49:52 +00:00
Daniel Schürmann
f1110576d9 nir: add info.fs.require_full_quads
This flag indicates the requirement of helper invocations
in fragment shaders, independent from any present instructions.
This fixes the lowering of OpGroupNonUniformQuad* instructions.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:31:52 +01:00
Daniel Schürmann
2db0507b5d nir/gather_info: add missing wide subgroup operations
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:31:46 +01:00
Daniel Schürmann
1179d83a89 nir: remove info.fs.needs_all_helper_invocations
Use info.uses_wide_subgroup_intrinsics instead.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:31:11 +01:00
Jesse Natalie
c69ca8c5c1 nir_lower_mem_access_bit_sizes: Fix assert (bit -> byte size)
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26293>
2023-11-21 19:11:40 +00:00
Timothy Arceri
4382bd8a34 nir: simplify nir_build_write_masked_store()
Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
0470f8f737 glsl: remove now unused lower distance pass
This has been replaced with a NIR based pass.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
33c2b64aa3 glsl: switch to NIR distance lowering pass
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
110887de2b glsl/nir: implement a nir based lower distance pass
This is based off the original GLSL IR pass but it is much much
simpler as it doesn't need to do all of the hackery required in
GLSL IR to achieve the lowering.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Timothy Arceri
95da0a9c96 nir: move build_write_masked_stores() to nir builder
We will reused this in the following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860>
2023-11-21 00:45:21 +00:00
Alejandro Piñeiro
c0cfa4f53b nir: add new opcodes to map new v71 packing/conversion instructions
Since v71, broadcom hw include specific packing/conversion
instructions, so this commit adds opcodes to be able to make use of
them, specially for image stores:

   * pack_2x16_to_unorm_2x8 (on backend vftounorm8/vftosnorm8):
     2x16-bit floating point to 2x8-bit unorm/snorm

   * f2unorm_16/f2snorm_16 (on backend ftounorm16/ftosnorm16):
     floating point to 16-bit unorm/snorm

   * pack_2x16_to_unorm_2x10/pack_2x16_to_unorm_10_2 (on backend
     vftounorm10lo/vftounorm10hi): used to convert a floating point to
     a r10g10b10a2 unorm

   * pack_32_to_r11g11b10 (on backend v11fpack): packs 2 2x16 FP into
     R11G11B10.

   * pack_uint_32_to_r10g10b10a2 (on backend v10pack): pack 2 2x16
     integer into R10G10B10A2

   * pack_4x16_to_4x8 (on backend v8pack): packs 2 2x16 bit integer
     into 4x8 bits.

   * pack_2x32_to_2x16 (on backend vpack): 2x32 bit to 2x16 integer
     pack

For the latter, it can be easly confused with the existing
pack_32_2x16_split. But note that this one receives two 16bit integer,
and packs them on a 32bit integer. But broadcom opcode takes two 32bit
integer, takes the lower halfword, and packs them as 2x16 on a 32bit
integer.

Interestingly broadcom also defines a similar one that packs the
higher halfword. Not used yet.

Note that at this point we use agnostic names, even if we add a _v3d
suffix as they are only available for broadcom, in order to follow
current NIR conventions.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25726>
2023-11-20 08:20:31 +00:00
Vinson Lee
e3afbd5c28 nir: Fix decomposed_prmcnt copy-paste error
Fix defect reported by Coverity Scan.

Copy-paste error (COPY_PASTE_ERROR)
copy_paste_error: prmcnt in prmcnt = -1 looks like a copy-paste error.

Fixes: cc3f20ca6c ("nir: Also gather decomposed primitive count")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26159>
2023-11-20 03:27:26 +00:00
Qiang Yu
7e4aac46ad nir: add force_f2f16_rtz option to lower f2f16 to f2f16_rtz
Used by OpenGL driver like radeonsi which has undefined rounding mode.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25990>
2023-11-20 02:20:17 +00:00
Mary Guillemard
60544cae07 nir: Add a ldtram_nv intrinsic
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26224>
2023-11-18 02:46:47 +00:00
Ian Romanick
52ee4cf229 nir/builder: Teach nir_pack_bits and nir_unpack_bits about 32_4x8
Also teach it how to pack and unpack 32-bits to or from 32-bits.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24741>
2023-11-17 21:00:59 +00:00
Ian Romanick
25743209c4 nir/lower_packing: Add lowering for nir_op_unpack_32_4x8
Nothing should currently hit this path.

The next commit adds code to nir_pack_bits and nir_unpack_bits that can
lead to this path being hit.

v2: Change nir_u2uN(..., 8) to nir_u2u8(...). Suggested by Alyssa.

v3: Don't generate nir_extract_u8 if the driver has set
lower_extract_byte. These instructions were causing some problems for
dozen.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> [v2]
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24741>
2023-11-17 21:00:59 +00:00
Ian Romanick
7a1a9fb287 nir/lower_packing: Don't generate nir_pack_32_4x8_split on drivers that can't handle it
It should not be possible for this to happen now as the nir_pack_32_4x8
instruction that is being lowered shouldn't exist. A later commit will
change this.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24741>
2023-11-17 21:00:59 +00:00
Anthony Roberts
a76cb87602 glsl: Use unsigned instead of enum type in ir_variable_data
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26254>
2023-11-17 20:08:49 +00:00
Jesse Natalie
df4fc66649 nir: Add a flag to opt_if to prevent fighting with splitting 64bit phis
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26210>
2023-11-17 19:19:11 +00:00
Alyssa Rosenzweig
0f0f6c6227 nir/validate: Specialize if source validation
Yet another bit of branchiness we should tame. 99% of the time, sources are not
for if's, so we shouldn't need to do the extra checking to handle that 1%.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
88d0fd03d6 nir/validate: Split out validate_sized_src
We don't check the sizes for ALU srcs, which is the hot path here, so split out
that simplified version for ALU instructions to use, while deriving a sized
version for other kinds of instructions.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
bfcc323954 nir/validate: Inline validate_ssa_src
There's no more nir_register.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
bfdb2862d6 nir/validate: Drop stale todo
We have dominance validation elsewhere in the file.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
9f341cefbb nir/validate: Don't check dimensions in validate_def
Instead, check it at the call sites when actually required (basically just
intrinsics), reducing the branching required when not (ALU validation, the
hottest of hot paths for CI).

IMHO this is more obvious too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
d2b1e6bed0 nir/validate: Use unlikely for validate_assert
No apparent performance difference, but documents the intention.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
e9d185dccf nir/validate: Don't validate out-of-bounds channels
Nothing should ever be reading them, they logically do not exist. So there's no
point validating them, especially when the validation in question is so useless
(just checking the bit width, without any semantic awareness). Yet now that we
support vec16, this loop is quite hot even on scalar ISAs, and rather
pointlessly so. Just remove it and bring the ALU src validation complexity to
O(# of channels in source) instead of O(max # of channels in NIR).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
8d5a1e5a77 nir/validate: Don't spam nir_alu_instr_channels
It doesn't inline and so is about 1% of M1 CTS time. Expand out the definition
and simplify the logic. Honestly, I think this is clearer too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
1786032029 nir/validate: Optimize ssa_srcs set
Profiling showed that maintaining this ssa_srcs set consumes ~3% of CTS time
with a debugoptimized build. Unfortunately, we really do benefit from getting
this coverage in CI. So rather than remove the validation, let's optimize the
data structure used so we can keep the coverage at a fraction of the cost.

The expensive piece is the pointer set, which is backed by a relatively
expensive hash table. It would be much cheaper to use an invasive set instead,
with a single "present" bit. We don't want to bloat nir_src for this, however
there's an easy solution: use a tagged pointer to steal a bit in the nir_src for
the job. We untag everything at the end of validation (and this meta-invariant
is asserted with an auxiliary counter), so while we mutate the IR while
validating, the mutations do not escape nir_validate.

We tag the parent pointer and not the def pointer, because it is dramatically
less used and therefore has far fewer disrupted call sites.

The M1 job is improved from 3:03 to 2:55 of deqp-runner reported time, which is
excellent.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Alyssa Rosenzweig
6d73f62e42 nir: Simplify nir_alu_instr_channel_used definition
Deduplicates the "get # of channels" logic which was the same between the
helpers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26084>
2023-11-17 09:36:08 -04:00
Daniel Schürmann
88afbbba11 nir: optimize open-coded quadVote* directly to new nir_quad intrinsics
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/218>
2023-11-17 09:45:40 +00:00
Connor Abbott
1dab2c5bd2 nir/subgroups: Add option to lower Boolean subgroup reductions
This will be useful for AMD, and probably Intel as well.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/218>
2023-11-17 09:45:40 +00:00
Connor Abbott
1cfb0ae92c nir: Add quad vote intrinsics
Both Intel and AMD have special hardware support for these.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/218>
2023-11-17 09:45:40 +00:00