Commit graph

182350 commits

Author SHA1 Message Date
Connor Abbott
ae9604c29e freedreno/afuc: README updates for a7xx
Mention the introduction of LPAC/BR/BV, and explain the shared control
reg space.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Connor Abbott
5ca347e727 freedreno: Update more control/pipe registers for a7xx
Copy over control registers that are mostly the same from a6xx and add a
definition of the EVENT_CMD pipe register, which is updated for a7xx
events.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Connor Abbott
d01be55340 freedreno/afuc: Decode (sdsN) modifier
This removes the last unknown flag from read/write instructions.

Because we now handle the write in CP_SET_DRAW_STATE more correctly when
emulating, we also have to update the control register definitions and
draw state emulation code to adjust.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Connor Abbott
55985b7301 freedreno/afuc: Add syntax for pre-increment addressing
This is inspired by the ARM syntax.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Connor Abbott
579227e028 freedreno/afuc: Use SQE registers for call stack
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Connor Abbott
da3cf26564 freedreno/afuc: Add separate "SQE registers"
It seems like starting with a6xx, the SQE has a special register space
for reading/writing the state of the processor itself, mainly used for
saving/restoring its state in preemption. Add support for disassembling
it, removing one of the unknown flags bits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Connor Abbott
7c919f0406 freedreno/afuc: Handle store instruction on a5xx
Turns out a5xx already had store, although not load. It was using the
high bit of the unknown flags for this.

Note that a6xx does use the high bit, and we fall back to not decoding
it at all here before properly decoding it in the next commit. Splitting
up the commits seems worth this small breakage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26691>
2023-12-18 17:01:35 +00:00
Dudemanguy
cef345129f vulkan/wsi/wayland: fix wl_event_queue memory leak
When creating the swapchain, this queue is created, but it was never
freed in wsi_wl_swapchain_free along with the rest of the resources.

Signed-off-by: Dudemanguy <random342@airmail.cc>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26052>
2023-12-18 16:28:53 +00:00
Jordan Justen
30faa7a483 anv, iris, intel/genxml: Update 3DSTATE_HS for xe2
Update 3DSTATE_HS programming for xe2

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:31 +00:00
Jordan Justen
8ba9988858 anv, iris, intel/genxml: Update 3DSTATE_GS for xe2
Update 3DSTATE_GS programming for xe2

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:31 +00:00
Jordan Justen
1bc7c966f4 intel/batch_decoder: Update 3DSTATE_PS decoding for xe2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:31 +00:00
Jordan Justen
a659b1f0c0 anv, blorp, iris, intel/genxml: Update 3DSTATE_PS_EXTRA for xe2
Update 3DSTATE_PS_EXTRA programming for xe2

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:31 +00:00
Jordan Justen
5548e6a478 anv, blorp, iris, intel/genxml: Update 3DSTATE_VS for xe2
Update 3DSTATE_VS programming for xe2

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:31 +00:00
Jordan Justen
f170995e66 anv, blorp, iris: Update 3DSTATE_PS programming for xe2
Rework:
 * Jordan: Move code into intel_update_ps_state()

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Zhang, Jianxun
80d9294d2d intel/isl: update 3DSTATE_STENCIL_BUFFER (xe2)
Update xml file and adjust driver code to compile.

Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Zhang, Jianxun
2a49a598ce intel/genxml: update 3DSTATE_DEPTH_BUFFER instruction (xe2)
Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Jordan Justen
99eadc2ecb intel/genxml: Add UNIFIED_COMPRESSION_FORMAT enum for xe2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Zhang, Jianxun
2c41811808 intel/genxml: update 3DSTATE_WM_HZ_OP instruction (xe2)
The depth clear value is provided from 3DSTATE_WM_HZ_OP now.

Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Zhang, Jianxun
5d4a995294 intel/genxml: Remove 3DSTATE_CLEAR_PARAMS instruction (xe2)
Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Rohan Garg
9512f61cd8 iris,isl: Adjust driver for several commands of clear color (xe2)
The xe2 xml will be updated in following commits. Commit message
has been updated by Jianxun.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26600>
2023-12-18 15:41:30 +00:00
Job Noorman
2d273c520c ir3: lower 64b registers before creating preamble
ir3_nir_lower_preamble cannot handle 64b @load/store_preamble so we have
to make sure ir3_nir_opt_preamble will never produce them. Up to now,
nir_lower_locals_to_regs was run after preamble lowering so 64b locals
could still be around when lowering the preamble. This patch moves
running this pass, as well as ir3_nir_lower_64b_regs, to before the
preamble lowering.

Fixed Piglit tests:
- spec@arb_gpu_shader_fp64@execution@fs-indirect-temp-double-dst
- spec@arb_gpu_shader_fp64@execution@built-in-functions@fs-frexp-dvec4-variable-index

This patch has no impact on shader-db.

Note: a few cleanup passes used to be run after nir_lower_locals_to_regs
(nir_opt_algebraic, nir_opt_constant_folding) and after
ir3_nir_lower_64b_regs (nir_lower_alu_to_scalar, nir_copy_prop). As far
as I can tell, these are not necessary anymore when running the register
lowering earlier so this patch removes them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26737>
2023-12-18 14:52:02 +00:00
Job Noorman
6cad2fc230 nir: add helper to create cursor after all @decl_regs
@decl_reg intrinsics must be in the first block so it's convenient to be
able to create an insertion point after all @decl_regs when the first
block needs to be split.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26737>
2023-12-18 14:52:02 +00:00
Tatsuyuki Ishi
533ec9843e radv: Precompute shader max_waves.
Doing it at bind-time causes a 1.4% overhead (among all driver calls) in
Overwatch 2. !24502 mentions that it can be precomputed in case overhead
is a concern, so do it here.

max_waves is stored directly in the radv_shader struct, because
ac_shader_config conforms to LLVM ABI and we cannot add anything custom,
and radv_shader_info needs to be determined from NIR only.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26692>
2023-12-18 14:31:25 +00:00
Tatsuyuki Ishi
1161f22c27 radv: Move up radv_get_max_waves, radv_get_max_scratch_waves.
To avoid forward declaration.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26692>
2023-12-18 14:31:25 +00:00
Tatsuyuki Ishi
e444908d65 radv: Simplify shader config assignment.
We don't hash this struct so direct assignment here is OK.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26692>
2023-12-18 14:31:24 +00:00
Samuel Pitoiset
4353b0ad72 radv: move emitting the fb mip tail workaround when rendering begins
It doesn't have to be emitted in the draw path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26589>
2023-12-18 13:06:29 +00:00
Samuel Pitoiset
7dd7e551b1 radv: stop checking FMASK for the fb mip tail workaround
Vulkan doesn't allow mipmaps with MSAA images, so checking for FMASK
shouldn't have any effect.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26589>
2023-12-18 13:06:29 +00:00
Samuel Pitoiset
57efe44f43 radv: add missing HTILE support for fb mip tail workaround
PAL also applies to depth/stencil images with HTILE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26589>
2023-12-18 13:06:29 +00:00
Tapani Pälli
82553774e2 iris: use intel_needs_workaround with 14015055625
This was missing from the FS stage primitive-id check. Also add usage
of macro to avoid running any extra code on platforms where this WA
would not apply.

Fixes: 0f14724039 ("iris: Implement Wa_14015297576")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26709>
2023-12-18 11:14:11 +00:00
Martin Roukala (né Peres)
240d11eb8d Revert "ci: disable the valve-kws farm until it can be rebooted"
This reverts commit 299cd1af82 as I
managed to reboot it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26733>
2023-12-18 07:53:42 +00:00
Dave Airlie
f76f4be301 intel/compiler: move gen5 final pass to actually be final pass
This got broken by the register conversion, this pass needs to be
after all the others.

Fixes: ce75c3c3fe ("intel: Switch to intrinsic-based registers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26731>
2023-12-18 07:24:37 +00:00
Martin Roukala (né Peres)
299cd1af82 ci: disable the valve-kws farm until it can be rebooted
We are having some issues related to serial consoles and I can't seem
to connect to the VPN to reboot the gateway.

So let's disable the farm until I get to it.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26730>
2023-12-18 08:27:54 +02:00
Eric Engestrom
377c6b2d45 ci/build: drop redundant meson/build.sh from jobs that already inherit from .meson-build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26714>
2023-12-17 17:03:08 +00:00
Yiwei Zhang
ddf2ca4faf vulkan/wsi/wayland: ensure drm modifiers stored in chain are immutable
Chain stored modifiers point to the mapping of the current feedback
shmem of the surface. The surface tracked feedback mapping will be gone
and replaced with new mapping during surface_dmabuf_feedback_done. There
are two issues here:
1. One issue is that the existing mapping is closed before been used to
   compare against new modifiers in sets_of_modifiers_are_the_same.
2. The other issue is that when the chain is still optimal, the chain
   persists while the mapping is still replaced with the one from the
   new format table shmem.

This change makes a deep copy of the modifiers to store in the chain to
ensure the modifiers used for the current chain are immutable through
the chain lifecycle.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26618>
2023-12-16 18:26:38 +00:00
David Heidelberg
33e8f22d84 ci/austriancoder: separate HW definition from SW
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26721>
2023-12-16 16:03:08 +01:00
Christian Gmeiner
64caf90632 etnaviv: disassembler: Switch to isaspec
Use the power of isaspec for our integrated disassembler.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
Christian Gmeiner
fa0ff0849c etnaviv: Add isaspec support
This commit adds etnaviv.xml which describes the used ISA. Quite some
time was spend to to get it into that shape by creating a big collection
of shader asm generated by the binary blob. These shaders are used as basis
for test driven development for this ISA specification.

The xml has some black spots but the internal disasm is used by
developers so that should be no problem. Some refinement will happen
during normal development.

This commit adds only disasm support.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
Christian Gmeiner
a8a33ac5ae isaspec: Add bool_inv type to print inverted bools
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
M Henning
586c34b19c nak: Optimize jumps to fall-through if possible
This saves 15 instructions on the compute shader in Sascha Willems'
computecloth example.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26473>
2023-12-16 06:10:23 +00:00
M Henning
b2420fae4b nak: Add a jump threading pass
This saves 16 instructions on the compute shader in Sascha Willems'
computecloth example.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26473>
2023-12-16 06:10:23 +00:00
M Henning
786bf749bc nak: Print out an instruction count
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26473>
2023-12-16 06:10:23 +00:00
George Ouzounoudis
55c8f5e288 nvk: Support extended dynamic state for tessellation domain origin
The tessellation domain origin, type, prims and spacing are all pushed
together in SET_TESSELLATION_PARAMETERS. So to support domain origin as
dynamic we need to push all these together when the state is dynamically
changed or when a new tessellation shader is bound.
This is also needed for EXT_shader_object.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
1319cfb40d nvk: Remove pipeline state setting functions
We do not need these functions for graphics pipelines anymore as all the
required state is now dynamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
453c50bef9 nvk: Support extended dynamic state for rasterization stream
This is needed for EXT_shader_object. Move to dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
d8945dd51e vulkan: Fix dynamic graphics state enum usage
Simply replace the correct rasterization stream enum

Fixes: 9d0ed9cbcc ("vulkan: Add more dynamic rasterizer state")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
8b178f9ce4 nvk: Support extended dynamic state for alpha to coverage/one
This is needed for EXT_shader_object. Move to dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
Faith Ekstrand
b42fae61bb nvk: Support extendedDynamicState3ColorWriteMask
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:50 -06:00
George Ouzounoudis
c7135e94cb nvk: Support extendedDynamicState3SampleMask
This is needed for EXT_shader_object. Move to dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:33 -06:00
George Ouzounoudis
88e661db99 nvk: Support extendedDynamicState3ColorBlendEquation
This is needed for EXT_shader_object. Move state to dynamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:33 -06:00
George Ouzounoudis
e27b4855f7 nvk: Support extendedDynamicState3ColorBlendEnable
This is needed for EXT_shader_object. Move state to dynamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:33 -06:00