Commit graph

179210 commits

Author SHA1 Message Date
Daniel Schürmann
541cfb21ba aco: don't attempt to spill dead phis
These don't affect register pressure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
e5d920e0b9 aco/scheduler: enable live variables validation when ACO_DEBUG=validate-livevars is set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
b0c8c5e42e aco: implement aco::validate_live_vars()
This is intended for passes which manually update live variables
and RegisterDemand, like e.g. the scheduler, and can be enabled
with ACO_DEBUG=validate-livevars.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
c1a3330ac7 aco/reindex_ssa: free memory of previous live variable sets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:47 +00:00
Samuel Pitoiset
d776f3d3f9 radv: allow VK_EXT_vertex_input_dynamic_state with DGC
It should be supported now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29831>
2024-08-14 07:47:12 +00:00
Samuel Pitoiset
55b497ef19 radv: add support for dynamic vertex input state with DGC
DGC preprocessing is disabled for VBOs, so the dynamic vertex input
should always be initialized. Null VBO descriptors are slightly
different when used with dynamic VS inputs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29831>
2024-08-14 07:47:12 +00:00
Samuel Pitoiset
d8861d52a2 radv: add a helper to set shader stage key robustness info
For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643>
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
7a5b40a2ff radv: cleanup robustness with vk_pipeline_robustness_state_fill()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643>
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
cdf21c5ce5 radv: fix handling view index from device index
This feature is marginal but VKCTS recently got coverage and most of
the implementations were broken, including RADV.

Fixes recent tests
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.view_index_from_device_index_.*

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30642>
2024-08-14 06:54:03 +00:00
Faith Ekstrand
aa44a211d3 nak: Pass -C default-linker-libraries when building tests
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11632
Fixes: 4392a5922c ("nak: Add a framework for running hardware tests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30618>
2024-08-14 03:45:09 +00:00
Caio Oliveira
e72bf2d02f intel: Add executor tool
Add a tool that programs the hardware the minimum amount to be
able to execute compute shaders and then executes a script that
can perform data manipulation and dispatch execution of the shaders
(written in Xe assembly).

The goal is to have a tool to experiment directly with certain
assembly instructions and the shared units without having to
instrument the drivers.

To make more convenient to write assembly, a few macros (indicated by
the @-symbol) will be processed into the full instruction.

For example, the script

```
  local r = execute {
    data={ [42] = 0x100 },
    src=[[
      @mov     g1      42
      @read    g2      g1

      @id      g3

      add(8)   g4<1>UD  g2<8,8,1>UD  g3<8,8,1>UD  { align1 @1 1Q };

      @write   g3       g4
      @eot
    ]]
  }

  dump(r, 4)
```

produces

```
  [0x00000000] 0x00000100 0x00000101 0x00000102 0x00000103
```

There's a help message inside the code that describes the script
environment and the macros for assembly sources.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Caio Oliveira
6267585778 intel/brw: Also return the size of the assembled shader
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Caio Oliveira
f6e7d1dca2 meson: Update Lua dependency version to 5.3
Lua is used for unittests in Freedreno.  When this was added, 5.3 was too new,
now this version is available in debian stable (and oldstable). A notable
improvement in Lua 5.3 is better handling for integers. Note the wrap provided
in subprojects/ already uses 5.4.

Also move the dependency up so other tools/tests can use it.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Rob Clark
a5b103e4c1 freedreno/a6xx: Cleanup setup_slices()
We don't need to runtime dispatch btwn a6xx and a7xx versions of
setup_lrz().

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Rob Clark
a127a78548 freedreno: Re-enable LRZ for a7xx
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Rob Clark
141466eb27 freedreno/a6xx: Fix LRZ
LRZ fastclear offset can be greater than 16b.

Fixes: b1937f76ff ("freedreno/a6xx: Allocate lrcfc when needed for direction tracking")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Rob Clark
4a59c319dc freedreno/decode: Dump register values on LRZ_CLEAR
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Alyssa Rosenzweig
639d69f7e6 pan/mdg: convert to derivative intrinsics
strictly I think there's a bug fix here. I don't see the old code handling
swizzles anywhere!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30567>
2024-08-14 01:34:54 +00:00
Alyssa Rosenzweig
749205fe06 pan/bi: switch to derivative intrinsics
rewrote most of the impl but shrug.

regresses code gen for mediump but I'm not too bothered given the lackluster
perf of fp16 on bifrost :(

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30567>
2024-08-14 01:34:54 +00:00
Paulo Zanoni
20c19351b1 anv: be consistent regarding non-render engines on i915.ko
Today, on i915.ko, if Sparse Resources is disabled and the Kernel is
new enough to confirm to us that the GuC version is good, we'll expose
non-render engines, otherwise we don't.

Ever since we merged 5ca224aa0c ("anv/trtt: make all contexts have
the same TR-TT programming"), TR-TT is not anymore the reason why
we're not enabling non-render engines. Our performance team has
analyzed workloads and concluded enabling non-render engines is not
worth it on i915.ko today.

So here we adjust the code to do three things:
 - Stop blaming TR-TT
 - Unify the default behavior for i915.ko
 - Don't disable non-render engines when TR-TT is being used on xe.ko.

v2:
- Comments (José)

Acked-by: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30627>
2024-08-14 01:09:19 +00:00
Christian Gmeiner
e05962a4e7 etnaviv: Drop halti from etna_specs
Use the one from etna_core_info instead.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30394>
2024-08-13 22:15:22 +00:00
Christian Gmeiner
6e0a28db2e etnaviv: Extend shader structs with etna_core_info
Prep step to drop halti from etna_specs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30394>
2024-08-13 22:15:22 +00:00
Christian Gmeiner
6d673a3ac7 etnaviv: Switch etna_compiler_create(..) to etna_core_info
Prep step to drop halti from etna_specs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30394>
2024-08-13 22:15:22 +00:00
Christian Gmeiner
ce2fc866ec etnaviv: Move halti determination to drm
The ideal place to store the halti value is in struct etna_core_info.
Let's put it there and the determination of it into etna_gpu_new(..).
This makes it possible to reuse the halti level outside of gallium.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30394>
2024-08-13 22:15:22 +00:00
Michael Cheng
0324d4bcf5 anv: move trace logic to batch_emit_pipe_control_write
Move trace logic from cmd_buffer_apply_pipe_flushes down to
genX(batch_emit_pipe_control_write).

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30623>
2024-08-13 21:42:43 +00:00
José Roberto de Souza
600d88ab3c intel: Remove INTEL_ENGINE_CLASS_COMPUTE and INTEL_ENGINE_CLASS_COPY parameters
It has been a while that the GuC version with the compute engine fix
was released, same for the KMD uAPI to query the GuC firmware version.
So at this point this parameters do more harm than good.

Also just setting those don't enable the async compute and copy engines
this is not enabled by default on i915.

If user wants to disable or enable usage of those engines a better
approach would be use ANV_QUEUE_OVERRIDE.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
61e3a680a4 anv: Extend ANV_QUEUE_OVERRIDE to blit count
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
92f4008473 anv: Disable sparse even on Xe KMD with ANV_SPARSE
ANV_SPARSE had no effect on Xe KMD.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30593>
2024-08-13 21:15:31 +00:00
Matt Turner
05dc4eb536 util: Force emission of stack frame in stack unit test
The `capture_not_overwritten` unit test captures and compares two
backtraces -- one from inside a call to `func_c` and one outside -- and
confirms that they are not identical. That is, that `func_c` is in the
backtrace.

On 32-bit x86, without `-fno-omit-frame-pointer`, the function will not
emit a stack frame. As a result, the unit test fails.

The fix is to compile `func_c` with the flag `-fno-omit-frame-pointer`
to prevent the compiler from optimizing out the stack frame which is
otherwise unneeded.

Bug: https://bugs.gentoo.org/823774
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091
Fixes: d0d14f3f64 ("util: Add unit test for stack backtrace caputure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
2024-08-13 20:35:23 +00:00
Matt Turner
b3430a7bb8 util: Add ATTRIBUTE_OPTIMIZE(flags)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
2024-08-13 20:35:23 +00:00
Sagar Ghuge
83c2524124 intel/compiler: Adjust trace ray control field on Xe2
Bspec 64643: Structure_TraceRayPayload::Trace Ray Control

Bit field moved from 9-8 to 10-8 on Xe2.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30600>
2024-08-13 20:02:24 +00:00
Sagar Ghuge
c3c62e493f intel/compiler: Ray query requires write-back register
Bspec 57508: Structure_SIMD16TraceRayMessage:: RayQuery Enable

   "When this bit is set in the header, Trace Ray Message behaves like a
   Ray Query. This message requires a write-back message indicating
   RayQuery for all valid Rays (SIMD lanes) have completed."

If we don't pass the write-back register, somehow it was stepping on
over R0 register and can mess up the scratch space accesses which could
potentially lead to GPU hang. It can be noticed while running it under
simulator trace.

send.rta (16|M0)         null     r124  r126:1  0x0            0x02000100           {$15} // wr:1+1, rd:0; simd16 trace ray
R0 = 00000001 00000000 00000000 00000001 00000000 00000000 00000001 00000000 00000000 00000001 00000000 00000000 00000001 00000000 00000000 00000001

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30600>
2024-08-13 20:02:24 +00:00
Mike Blumenkrantz
a7f64c6203 zink: fix partial update handling
* the damage region was not being used correctly (this is a normal rect)
* use_damage was never unset at frame boundary
* original renderArea was never re-set

Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30625>
2024-08-13 15:26:27 +00:00
Job Noorman
2260a4bbba ir3: fix spill/reload split src/dst regs
When splitting spills/reloads into to multiple separate spills/reloads,
the src/dst registers where not adjusted. This caused the separate
instructions too all refer to the same register.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30613>
2024-08-13 14:59:23 +00:00
Samuel Pitoiset
092b0ecc2e ci: add GFX1150 support to radv-fossils
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30620>
2024-08-13 13:17:17 +00:00
Samuel Pitoiset
99b12b2a65 amd/drm-shim: add GFX1150 support
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30620>
2024-08-13 13:17:17 +00:00
Samuel Pitoiset
2b3cf188de amd/drm-shim: add missing GC_11_5_0 family
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30620>
2024-08-13 13:17:17 +00:00
Alyssa Rosenzweig
fd63356268 r300: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
2024-08-13 12:45:12 +00:00
Alyssa Rosenzweig
772e6d61b9 ntt: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
2024-08-13 12:45:12 +00:00
Pavel Ondračka
9966365fe0 ttn: switch to derivative intrinsics
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
2024-08-13 12:45:12 +00:00
Alyssa Rosenzweig
5f437aa24d elk: fix compute shader derivatives
derivatives are not fs only so move to be with the rest of subgroup ops.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11674
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30634>
2024-08-13 12:19:30 +00:00
Iago Toral Quiroga
ad9ff707ce broadcom: drop backend implementation of nir_op_ufind_msb
We can have NIR do this for us now that we have uclz.

Suggested by Georg Lehmann.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30614>
2024-08-13 13:16:18 +02:00
Iago Toral Quiroga
35a10f5d5a broadcom: implement nir_op_uclz
This enables some algebraic optimizations.

No changes in shader-db, but it does cause some CTS tests to
produce less instructions.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30614>
2024-08-13 13:16:11 +02:00
Lionel Landwerlin
aaff191356 brw/rt: fix ray_object_(direction|origin) for closest-hit shaders
When closest hit shader is called, the BVH object level
brw_nir_rt_load_mem_ray origin/direction is 0. What we should be using
is the ray origin/direction and apply the transform of the current
instance.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ba7d459a3 ("intel/rt: Implement the new ray-tracing system values")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30578>
2024-08-13 10:28:50 +00:00
Karol Herbst
7935623126 rusticl/kernel: simplify adding internal kernel args
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
d72cc037f2 rusticl/kernel: move CompiledKernelArg decleration above the impl block
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
24ea5a756c rusticl/kernel: add KernelArgType::is_opaque
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
d26d17bbaf rusticl/kernel: big kernel arg rework
The main change here is that instead of having two vectors for API and
internal arguments, there is just one per built kernel.

Some of the API level information is still in its own structure and
referenced by the above mentioned merged vector, but with this change each
device and also each kernel variant can have arguments placed at different
locations or even have a different set of arguments.

This rework will be necessary to add kernel variants in a non messy way.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
0b98e47d83 rusticl/kernel: move serialization code of KernelArgType
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
2645ba6942 rusticl/kernel: rename InternalKernelArgType to CompiledKernelArgType
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00