Commit graph

184774 commits

Author SHA1 Message Date
Dave Airlie
b4a6a876be vulkan/video: start to wrap the video structs for deep copies.
This doesn't do any of the deep copies, it's just more non-functional changes
in preparation.

v2: fix alloc sizes

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Dave Airlie
b72b4d8a0e vulkan/video: rename some of the parameter tracking structs.
This will make it easier to add deep copy support.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Dave Airlie
57d83cb99c vulkan/video: drop unused function.
This looks to have been left over.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27066>
2024-01-16 00:54:35 +00:00
Marek Olšák
7ed27bff0b winsys/amdgpu: cosmetic touchups around IB sizes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
6e1dae77a9 winsys/amdgpu: represent max_ib_size_dw in bytes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
fd1e36a044 winsys/amdgpu: represent IB_MAX_SUBMIT_DWORDS in bytes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
a008a7dcdf winsys/amdgpu: remove misplaced duplicated comment
The same comment is in the header file where it should be.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
b2b7603ecb winsys/amdgpu: don't clear fence list elements after IB submission
Same idea as with the buffer lists.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
fb3171b653 winsys/amdgpu: add more fence_reference helpers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
a94319d29b winsys/amdgpu: don't clear buffer list elements after IB submission
amdgpu_winsys_bo_reference(dst, NULL) sets *dst to NULL, but we never read
*dst again because we set num_buffers to 0. So don't touch the buffer list
elements and only decrement the BO refcount. It makes a difference when you
have 10k BOs.

The CS thread overhead in VP2020/Catia1: 9.23% -> 8.74%

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
2da16e9635 winsys/amdgpu: cosmetic touchups
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Marek Olšák
1e06cdad0d winsys/amdgpu: merge loops decrementing num_active_ioctls & unreferencing bufs
We have 2 separate loops doing that. num_active_ioctls was decremented
in amdgpu_cs_submit_ib, while buffers were unreferenced
in amdgpu_cs_context_cleanup immediately after it.

Split unreferencing buffers from amdgpu_cs_context_cleanup, so that it's
not done in amdgpu_cs_submit_ib, which will do it in the same loop where
num_active_ioctls is unreferenced.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27060>
2024-01-15 23:21:25 +00:00
Faith Ekstrand
f1cf7f0d86 nak: Stop passing --explicit-padding to bindgen
It's apparently broken on 32-bit builds and screws up our NIR bindings.
Instead, using -Wpadded with a pragma to ensure we don't add padding to
the struct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27078>
2024-01-15 20:45:14 +00:00
chyyran
f079b6a18d util/format/fxt1: include "u_format_pack.h" instead of "util/format/u_format_pack.h"
Signed-off-by: Ronny Chan <ronny@ronnychan.ca>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26608>
2024-01-15 20:13:07 +00:00
Danylo Piliaiev
43bc212aeb ir3: Add fullsync and fullnop ir3 dbg options for over-syncing
- fullsync - adds (ss)(sy) after each cat4/cat5/cat6
- fullnop - adds (rpt4) nop before every instruction

Useful to debug errors in inter-instruction synchronization.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27012>
2024-01-15 19:15:26 +00:00
Danylo Piliaiev
123c5e7c3a ir3: Fix "print" meta instruction synchronization
There was a WAR hazard if something writes to sources last STG is
using. (sy)nop did not wait for sources to become "free", we
need to use (ss).

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27013>
2024-01-15 18:48:49 +00:00
Karol Herbst
ea023ff5cd rusticl/kernel: no need to reset the scratch size anymore
The scratch size gets assigned by nir_lower_vars_to_explicit_types. Now
that we only run it once on temp memory, there is no need to reset the
value.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
2024-01-15 16:41:12 +00:00
Karol Herbst
835c208578 rusticl/kernel: add a few comments in regards to pass ordering
This is helpful as otherwise I'll keep doing the same mistakes trying to
fix anything in here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
2024-01-15 16:41:12 +00:00
Karol Herbst
f896659894 rusticl/kernel: run opt/lower_memcpy later to fix a crash
nir_opt_memcpy requires explicit types to function properly. So run them
after lowering vars to explicit types.

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
2024-01-15 16:41:12 +00:00
Lucas Stach
2f229a8ba6 etnaviv: implicitly update shared texture resources
Implicitly update shared texture resources whenever they are first
used after the context has been flushed. This implements the
necessary behavior to get updated content for resources shared
outside of the screen without relying on any other API level
trigger, discussed to be necessary in [1].

[1] https://github.com/KhronosGroup/OpenGL-Registry/issues/566

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6220
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
2024-01-15 14:19:17 +00:00
Lucas Stach
27ac55873a etnaviv: only add shared resources to implicit flush list
The implicit flushing is only required if the resource is shared
and changes to the resource must be visible outside of the screen
after the flush. For non-shared resources we can rely on the
screen internal tracking of data updates.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
2024-01-15 14:19:17 +00:00
Lucas Stach
9ab9df3941 etnaviv: track resource sharing
Track if resources are shared outside of the screen, which means
changes to the resource must be visible to the external observers
after a flush and the resource might be manipulated by other
agents than the contexts from the screen.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
2024-01-15 14:19:17 +00:00
Juan A. Suarez Romero
22c4a5e127 v3d/ci: run OpenGL 3.1 tests
As driver supports OpenGL 3.1, run proper tests, besides the OpenGL ES
tests.

Note that including GL3.1 is not required to include previous versions.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27069>
2024-01-15 13:46:28 +00:00
Danylo Piliaiev
480ec5b1d4 freedreno/replay: Add WSL backend for Windows
d3dkmthk.h contains only non driver specific structs, private
data structs are not defined anywhere public but contain
important information for memory allocation and submissions.
Luckily only small parts of these structs are relevant for what
we want to do and most of them are not changed between calls.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Danylo Piliaiev
16de8e99cf freedreno/replay: Correctly free iova on msm backend
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Danylo Piliaiev
56a6bc758d freedreno/replay: Delete all buffers after each submission
We expect all buffers to be dumped before each submission, so tracking
whether buffer is used is wrong.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Juan A. Suarez Romero
985a5c8f1a broadcom/simulator: protect simulator BO rallocs with mutexes
Move ralloc allocations and frees for BOs into the critical sections
protected with mutexes.

This fixes several double-free and use-after-free crashes that happens
sometimes when using the simulator to run Vulkan CTS tests, specially
when these tests involve multithreading, like
`dEQP-VK.api.object_management.multithreaded_per_thread_resources.device_memory_small`.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27070>
2024-01-15 12:52:34 +00:00
Lionel Landwerlin
56eb09480b anv: rename video command file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:50 +00:00
Lionel Landwerlin
51d63f2236 anv: move compute/ray-tracing commands to their own file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:50 +00:00
Lionel Landwerlin
cfe894e1e9 anv: move draw commands to their own file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:50 +00:00
Lionel Landwerlin
ddc18b4e78 anv: move generated draw flush helper to its own file
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Lionel Landwerlin
df1dc882cb anv: fix missing header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Lionel Landwerlin
74c8edd288 anv: fix include guards
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Lionel Landwerlin
6bb3ae99c5 anv: export descriptor flushing functions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26989>
2024-01-15 12:28:49 +00:00
Tatsuyuki Ishi
43fb43ba2c radv: never set DISABLE_WR_CONFIRM for CP DMA clears and copies
This mirrors the changes in 69ff9c16bb ("radeonsi: never set
DISABLE_WR_CONFIRM for CP DMA clears and copies").

Cc: mesa-stable
Suggested-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27053>
2024-01-15 12:09:01 +00:00
Samuel Pitoiset
b555f9451c radv: introduce radv_graphics_state_key
This struct only contains graphics related state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
b888677dcf radv: add vertex_robustness1 to radv_shader_stage_key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
f2f87d0872 radv: re-organize radv_pipeline_key
Rename and regroup fields per PSO basically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
fb80421a62 radv: stop passing the pipeline key when compiling compute/rt shaders
The pipeline key now essentially contains graphics state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e7018e74d radv: remove unused lower_rt_instruction_monolithic_state::key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
ea89328fb4 radv: remove unecessary radv_nir_compiler_options::key
This is no longer useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
6e1a73a53d radv: add optimisations_disabled to radv_shader_stage_key
At some point, we will probably have a VK_SHADER_CREATE_xxx flag
matching the pipeline one. So, I think it's more like a per-shader
field. It can also be useful to disable optimisations per stage when
debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
3a776f036f radv: use radv_shader_stage_key directly with pre-existing fields
More fields will be moved to radv_shader_stage_key but start using it
with pre-existing fields.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
28e330c245 radv: add radv_shader_stage_key to radv_shader_stage
For storing the per-stage key information like robustness etc. This
will fit well with ESO as well.

For pipelines, they are copied from radv_pipeline_key, similarly to
the radv_pipeline_layout/radv_shader_layout pair.

This will also allow us to kill radv_pipeline_key for compute/rt
pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
cff2a3aafc radv: move radv_pipeline_key::mesh_fast_launch_2 to the per-device cache key
This is a global thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
d74150fc66 radv: remove one unused parameter in radv_fill_shader_info_ngg()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
138ce72860 radv/nir: remove useless struct for nir_shader typedef
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Samuel Pitoiset
18349692d0 radv/nir: pass radv_shader_stage to some radv_nir_xxx() functions
Instead of passing separate parameters for args, layout, info etc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>
2024-01-15 11:49:04 +00:00
Lionel Landwerlin
7e111268f1 intel/hang_viewer: add aux-tt view
Allows you to visualize the AUX-TT.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00
Lionel Landwerlin
78a881af43 intel/genxml: add GAM done register description
Useful if you encounter some kind of pagefault (including with
AUX-TT).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27058>
2024-01-15 11:16:40 +00:00