Commit graph

64058 commits

Author SHA1 Message Date
Marek Olšák
8618062b3c st/mesa: constify the pipe_draw_info parameter and remove obsolete comments
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27525>
2024-02-10 04:55:35 +00:00
Caio Oliveira
bf30127941 crocus: Call blorp_finish() when destroying context
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27502>
2024-02-09 23:09:50 +00:00
Caio Oliveira
083ef7e338 iris: Call blorp_finish() when destroying context
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27502>
2024-02-09 23:09:50 +00:00
José Roberto de Souza
bde9a16ce8 iris: Switch to truly asynchronous VM binding in Xe KMD
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26805>
2024-02-09 20:24:48 +00:00
José Roberto de Souza
63abbb24ad iris: Start to use intel_bind_timeline
With this patch, VM binds remain synchronous in relation to vm_bind()
KMD backend calls. However, the syscalls required for VM bind is
reduce in 2(in the optimal cases), the syncobj create and destroy
syscall are replaced by he usage a timeline syncobj.

Next step will be make this completely asynchronous.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26805>
2024-02-09 20:24:48 +00:00
Erik Faye-Lund
f40d32770a targets/va: override LIBVA_DRIVERS_PATH in devenv
This is really the right thing to do; it makes libva pick up the driver
we just built in a meson devenv. Not doing so can be kinda fatal;
otherwise we can end up loading different gallium-drivers for OpenGL and
VA-API, which can end up being pretty fatal.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27514>
2024-02-09 14:57:11 +00:00
Alyssa Rosenzweig
3c3f7cb747 compiler,gallium: move u_decomposed_prim to common
nir will use

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27457>
2024-02-09 11:53:31 +00:00
Pierre-Eric Pelloux-Prayer
ac426e1164 winsys/amdgpu: remove unused amdgpu_fence_is_syncobj
Unused since !24724.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27412>
2024-02-09 09:21:07 +01:00
Pierre-Eric Pelloux-Prayer
f7facda322 winsys/amdgpu: unmap user fence BO before destroy
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27412>
2024-02-09 09:21:00 +01:00
Mike Blumenkrantz
0a243a7241 zink: adjust swizzled deref loads by the variable component offset
this code is intended to transform a block like:

```
  32    %306 = @load_interpolated_input (%34, %0 (0x0)) (base=3, component=2, dest_type=float32, io location=VARYING_SLOT_VAR3 slots=1)
  32x2  %307 = fsub %305, %306.xx
```

into derefs. the existing code generates this:

```
decl_var shader_in INTERP_MODE_NONE none vec2 #7 (VARYING_SLOT_VAR3.zw, 0, 0)
  32    %516 = deref_var &#7 (shader_in vec2)
  32x2  %517 = @load_deref (%516) (access=none)
  32    %518 = mov %517.z
error: src->swizzle[i] < num_components (../src/compiler/nir/nir_validate.c:216)
```

the problem is attempting to reapply the component offset to a variable which is
already at an offset

fixes #10567

Fixes: 17a35412dc ("zink: re-rework i/o variable handling to make having variables entirely optional")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27522>
2024-02-09 02:29:22 +00:00
Mike Blumenkrantz
fab5c706fe mesa: plumb errors through to texture allocation
the spec allows this and tests like spec@arb_texture_multisample@arb_texture_multisample-dsa-texelfetch
expect it

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25931>
2024-02-08 23:30:23 +00:00
Jesse Natalie
6d8461f545 d3d12: Subgroup ballot
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27528>
2024-02-08 20:41:58 +00:00
Boris Brezillon
5b1b76e9cd panfrost: Pad compute jobs with zeros on v4
Apparently, Midgard GPUs don't like when the last 2 words of
compute/vertex jobs contain garbage. Extend the compute job definition
to include a padding section thus aligning the job on a 64-byte boundary,
and add the according pan_section_pack() calls where we have a
compute job filled.

Fixes: b76420be1f ("panfrost: Split command stream descriptor definitions per-gen")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10558
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Anton Bambura <jenneron@postmarketos.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27515>
2024-02-08 12:49:33 +00:00
Marek Olšák
0ac5dc5ab5 gallium/u_threaded: expose helpers for filling set_vertex_buffers externally
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27198>
2024-02-08 11:28:30 +00:00
Rob Clark
c3062e3402 freedreno: Fix MSAA z/s layout in GMEM
A bit surprised that this didn't show up in any piglit or deqp.

Fixes: cf0c7258ee ("freedreno/a5xx: MSAA")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27508>
2024-02-07 20:26:25 +00:00
Pavel Ondračka
0ac6801970 r300: fix vs output register indexing
Vertex shaders were writing TEXCOORDs before GENERICS, however
fragment shaders were reading it the opposite way, so this caused
problems for shaders that used both TEXCOORD and GENERIC varyings.

Fixes: d4b8e8a481
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10489
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27469>
2024-02-07 16:24:52 +00:00
Pavel Ondračka
e4ccfde123 r300/ci: add two more observed piglit flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27469>
2024-02-07 16:24:52 +00:00
José Roberto de Souza
665d30b544 iris: Wait for drm_xe_exec_queue to be idle before destroying it
Xe KMD don't refcount anything, so resources could be freed while they
are still in use if we don't wait for exec_queue to be idle.

This issue was found with Xe KMD error capture, VM was already
destroyed when it attemped to capture error state but it can also
happen in applications that did not hang.

This fixed the '*ERROR* GT0: TLB invalidation' errors when running
piglit all test list.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27500>
2024-02-07 13:56:17 +00:00
José Roberto de Souza
138303fb9d iris: Fix return of iris_wait_syncobj()
iris_wait_syncobj() succeed if IOCTL return is 0 otherwise it failled.

Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27500>
2024-02-07 13:56:17 +00:00
Pavel Ondračka
b243b1eddc r300: remove compiler tests
There are only three very simple tests but several hundreds of lines of
corresponding infrastructure. The tests never helped me to catch a real
issue and in fact I've only seen them fail when I changed the
corresponding pass semantics and forgot to update the tests (or like
when we enabled r300 in debian-testing and AddressSanitizer complained
that there was not a single free in the tests).

We now have a real CI and both piglit and dEQP contain tests that cover
the regalloc and presub testing here and a shader-db run should catch
if we fail the one omod optimization the optimize test is testing. So I
think its time we just get rid of the tests.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27501>
2024-02-07 13:57:19 +01:00
Marek Olšák
72948d9ff9 radeonsi,aco: remove the VS prolog
The upside is that this removes 600 lines of code. The downside is
that if instance divisors are used, we will compile the VS on demand.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27120>
2024-02-07 09:50:53 +00:00
Marek Olšák
0496cd5e5a gallium/noop: don't leak resources due to take_ownership
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
47c1f389ed gallium: remove take_ownership from set_vertex_buffers, assume it's true
This removes the take_ownership parameter and defines the behavior as if
take_ownership was always true, which is the fast path. This way, we don't
have to have 2 codepaths in set_vertex_buffers of every driver.

The old behavior is optionally available through util_set_vertex_buffers.

It also documents a new constraint that count in set_vertex_buffers must be
equal to the number of vertex buffers referenced by vertex elements or 0.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
b23f52b7e4 gallium/u_threaded: allow drivers to change tc_call_set_vertex_buffers function
Move the execute function pointers to struct threaded_context, so that
drivers can change it. Also move struct tc_vertex_buffers into the header
file, so that drivers can implement their own function.

This allows drivers to inline pipe_context::set_vertex_buffers for TC.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
b66ee99bc2 gallium/u_threaded: remove the count=0 path from tc_call_set_vertex_buffers
The default path has the same behavior.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
6ab25f5cde cso: remove CSO_UNBIND_VERTEX_BUFFER0
It has no effect other than unreferencing buffers, which are then
immediatelly re-bound by st/mesa, so it doesn't do anything.
The name is also incorrect because it unbound all vertex buffers.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
47b15d83a2 gallium/hud: set take_ownership=true for set_vertex_buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
e271d342a4 gallium/util: add take_ownership parameter into util_draw_vertex_buffer
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:42 +00:00
Marek Olšák
ab3e029e40 gallium/u_blitter: set take_ownership=true for set_vertex_buffers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:41 +00:00
Marek Olšák
f0b31858e1 gallium: always set vertex elements before setting vertex buffers
Drivers can use this constraint to merge vertex elements and vertex
buffers in set_vertex_buffers instead of in draw_vbo.

Suggested by: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8142

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27492>
2024-02-07 09:19:41 +00:00
Marek Olšák
fff6d332d9 radeonsi/ci: add gfx11 flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:45 -05:00
Marek Olšák
33aac684b4 radeonsi: use num_vertex_buffers instead of ARRAY_SIZE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:42 -05:00
Marek Olšák
0e02149ac9 winsys/amdgpu: don't ref/unref slab BOs in amdgpu_cs_submit_ib
It's pointless to increase the refcount of the backing BO and then decrease
it in the same function when we already reference the slab entry BO that
holds the reference of the backing BO.

amdgpu_do_add_buffer is inlined in amdgpu_cs_submit_ib, so the new parameter
doesn't cost anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:39 -05:00
Marek Olšák
04de7cc985 winsys/amdgpu: simplify amdgpu_do_add_buffer to remove memset
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:36 -05:00
Marek Olšák
c79697fec5 winsys/amdgpu: skip code checking RADEON_USAGE_SYNCHRONIZED for slabs
We unset RADEON_USAGE_SYNCHRONIZED, but we still checked it.
Iterate over such buffers separately without checking
RADEON_USAGE_SYNCHRONIZED.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:25 -05:00
Marek Olšák
0911aea126 winsys/amdgpu: merge 2 loops iterating over real BOs in amdgpu_cs_submit_ib
The first loop updates sequence numbers. The second loop creates the BO list.
Do both in the same loop.

Each loop has to reload the whole BO list from the L2 cache or higher, so we
do it twice. By merging the loops, we only load the BO list from the L2
cache once.

The final result is actually 2 loops, but they iterate over different ranges
of the BO list, so each element is read only once.

If global_bo_list is enabled, it overwrites the BO list after all is done.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:22 -05:00
Marek Olšák
d704f92b13 winsys/amdgpu: merge 2 loops iterating over sparse BOs in amdgpu_cs_submit_ib
The first loop is inside amdgpu_add_sparse_backing_buffers. The second loop
iterates over sparse BOs to update sequence numbers.

Each loop has to reload the whole BO list from the L2 cache or higher, so we
do it twice. By merging the loops, we only load the BO list from the L2
cache once.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:20 -05:00
Marek Olšák
32625c7903 winsys/amdgpu: merge 2 loops iterating over slab entries in amdgpu_cs_submit_ib
The first loop is inside amdgpu_add_slab_backing_buffers. The second loop
iterates over BOs to update sequence numbers.

Each loop has to reload the whole BO list from the L2 cache or higher, so we
do it twice. By merging the loops, we only load the BO list from the L2
cache once.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:18 -05:00
Marek Olšák
77e96cec6e winsys/amdgpu: move code out of amdgpu_add_bo_fences_to_dependencies for reuse
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:16 -05:00
Marek Olšák
436ebe4ef6 winsys/amdgpu: change the signature of amdgpu_add_bo_fences_to_dependencies
for future work

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:14 -05:00
Marek Olšák
75ffd738ac winsys/amdgpu: add real buffers of slab entries in the CS thread
This removes the overhead from the driver thread and simplifies
amdgpu_cs_add_buffer.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:12 -05:00
Marek Olšák
41f6d24fc8 winsys/amdgpu: fix a race condition when reading ws->num_buffers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27408>
2024-02-07 02:30:10 -05:00
Jordan Justen
edf93db5ee iris: Extend MTL modifiers to ARL devices
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27352>
2024-02-06 21:23:19 +00:00
David Rosca
fa8e0ba3f7 frontends/va: Fix updating AV1 rate control parameters
Follow the same logic as H264.

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27481>
2024-02-06 21:07:28 +00:00
Eric Engestrom
58e7085cb0 lvp: enable VK_EXT_headless_surface on all platforms except Windows
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27448>
2024-02-06 20:32:39 +00:00
Pavel Ondračka
238c3d593b r300/ci: update piglit fails
Most likely changed by recent piglit uprev.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27493>
2024-02-06 17:32:13 +00:00
Mike Blumenkrantz
af51e5f7a9 zink: split out sparse_residency_code_and lowering
the lowering for is_sparse_texels_resident must run after all the instances of
sparse_residency_code_and have been eliminated in order to effectively guarantee
that there are no remaining cases of tex.e (sparse) component access

fixes #10548

Fixes: f0ca477b500 ("zink: run sparse lowering after all optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27474>
2024-02-05 21:28:47 +00:00
Mike Blumenkrantz
f5174593c1 zink: add back (safe) optimizations after sparse lowering
this cleans up the sparse_residency_code_and disaster

Fixes: f0ca477b500 ("zink: run sparse lowering after all optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27474>
2024-02-05 21:28:47 +00:00
Caio Oliveira
40d119979a iris: Remove unused paramater
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27476>
2024-02-05 21:07:20 +00:00
Caio Oliveira
a4dc5bd9fd iris: Remove prototypes for unsupported Gfx versions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27476>
2024-02-05 21:07:20 +00:00