Commit Graph

184451 Commits

Author SHA1 Message Date
Corentin Noël
72886cbefa zink: Only call reapply_color_write if EXT_color_write_enable is available
Allows to use zink with drivers that do not expose this extension.

Backport-to: 23.3 24.0
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27516>
2024-02-12 09:19:47 +00:00
Timothy Arceri
62fa5c8d0f Revert "ci: Enable GALLIUM_DUMP_CPU=true only in the clang job"
Rob worded it well in 9e8450b65c.

"We don't want util_cpu to vomit cpu caps all over the test output."

This reverts commit c6979d97e4.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27564>
2024-02-12 08:43:31 +00:00
Samuel Pitoiset
6cab5559f9 radv: add support for emitting TES+GS compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
dd92f5f664 radv: bind the vertex input SGPR only for relevant stages
Otherwise, user_data_0 is wrong if merged shaders are compiled
separately and if we have GS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
d64d7373f3 radv: declare AC_UD_TES_STATE for separate compilation of GS on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
e15d1ed7cb radv: declare streamout buffers for TES+GS compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
83bc7e27a5 radv: force GS stage for TES as ES compiled separately on GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27432>
2024-02-12 08:09:28 +00:00
Samuel Pitoiset
b58de424f4 radv: fix RGP barrier reason for RP barriers inserted by the runtime
Without that, RGP is confused and it's reporting CmdPipelineBarrier()
instead of CmdRenderPassSync().

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27546>
2024-02-12 07:50:16 +00:00
M Henning
d98ff2cc4a nvk: Don't clobber vb0 after repeated blits
If a program does two blits in a row, we internally do a sequence of
operations that involves binding vb0.

Previously, the vb0 state after each operation would look something like:

| operation                    | cmd->state.gfx.vb0 | hardware  | save->vb0 |
| ---------------------------- | ------------------ | --------- | --------- |
|                              | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal0) | internal0          | internal0 | user      |
| nvk_meta_end()               | internal0          | user      |           |
| nvk_meta_begin()             | internal0          | user      | internal0 |
| BindVertexBuffers(internal1) | internal1          | internal1 | internal0 |
| nvk_meta_end()               | internal1          | internal0 |           |

That is, CmdBindVertexBuffers() would update cmd->state.gfx.vb0, but
nvk_meta_end() would not. This meant that the last operation would bind a
driver-internal buffer instead of the original value that the user set.

This change fixes the issue by tracking cmd->state.gfx.vb0 in
nvk_cmd_bind_vertex_buffer(), which both CmdBindVertexBuffers() and
nvk_meta_end() call into.

After this commit, the state looks like:

| operation                    | cmd->state.gfx.vb0 | hardware  | save->vb0 |
| ---------------------------- | ------------------ | --------- | --------- |
|                              | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal0) | internal0          | internal0 | user      |
| nvk_meta_end()               | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal1) | internal1          | internal1 | user      |
| nvk_meta_end()               | user               | user      |           |

To test this commit, build gtk4 commit 87b66de1, run:

    GSK_RENDERER=vulkan gtk4-demo --run=image_scaling

then select trilinear filtering in the dropdown and check for rendering
artifacts.

Fixes: e1c66501 ("nvk: Use vk_meta for CmdClearAttachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27559>
2024-02-12 05:14:38 +00:00
David Heidelberg
53ff663874 ci/etnaviv: update expectations
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27562>
2024-02-12 01:25:24 +01:00
David Heidelberg
3f7a388d48 ci/freedreno: add fail found by new Piglit
Fixes: 1c29869c20 ("Uprev Piglit to e9316bcd12544aaf7e753ce37fe50d64165d9598")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27562>
2024-02-12 01:16:58 +01:00
David Heidelberg
a16033b6a7 ci: bump kernel to 6.6.16 + enable X2APIC
Should lead to slightly better reliability + eventual performance boost
on Intel HW.

Also reverted:

 - `ae795abe7b3e ("drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks")`
 - `78a1eb102c7f ("drm/msm/dsi: Enable runtime PM")`

so a306 testing won't break.

Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27532>
2024-02-11 16:07:20 +01:00
Hans-Kristian Arntzen
bd23753991 wsi/x11: Rewrite logic for how we consider minImageCount.
MAILBOX reduced from 5 to 4 to be more inline with WL.

With xwayland_wait_ready = false now being the default,
add some extra consideration for non-FIFO present modes.
Add a lengthy rationale for why minImageCount = 3 is exposed on Xwl.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27074>
2024-02-10 11:47:22 +00:00
Hans-Kristian Arntzen
8b4259e69b wsi/x11: Disable vk_xwayland_wait_ready by default on most drivers.
Venus is special and still requires extra waits.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27074>
2024-02-10 11:47:22 +00:00
Błażej Szczygieł
fc8a83c96d gallivm/ssbo: mask offset with exec_mask instead of building the 'if'
It prevents reading the invalid out-of-bounds offset if exec_mask
is 0 without building the 'if' condition. We can do it only when
reading the memory. It's faster than run time 'if' condition

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27302>
2024-02-10 08:20:54 +00:00
Błażej Szczygieł
9ff3bec484 gallivm/ssbo: replace run time loop by compile time loop
Unrolled loop is notably faster.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27302>
2024-02-10 08:20:53 +00:00
Marek Olšák
bab4399970 mesa: add gl_vertex_array_object::NonIdentityBufferAttribMapping
It will be used to skip the indirection from vertex attribs to vertex
buffers.

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
Marek Olšák
10f08c2733 mesa: inline _mesa_set_vao_immutable
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
Marek Olšák
9aa205668b mesa: inline {Create,Draw}GalliumVertexState callbacks
They are always constant.

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
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
Lionel Landwerlin
d699600da1 anv: reduce cache flushing for indirect commands on Gfx12.5+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27257>
2024-02-09 22:46:07 +00:00
Georg Lehmann
36f23bf96d aco: print exec/vcc_lo/hi for single dword access
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
684014ff12 aco: print permlane16 bc/fi
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
f469fda44c aco: don't print hi() for permlane opsel
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
b59f5f9c85 aco: print neg prettier for packed math
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
767eb15ddc aco/print_ir: don't use alloca for input modifiers
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27455>
2024-02-09 22:14:44 +00:00
Georg Lehmann
cd6d9c5918 aco: don't remove branches that skip v_writelane_b32
Cc: mesa-stable

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27537>
2024-02-09 21:55:02 +00:00
Georg Lehmann
2c4980716f aco: add packed fma dpp note to README-ISA
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27533>
2024-02-09 21:36:53 +00:00
Georg Lehmann
e927c5004f aco/gfx11+: disable v_pk_fmac_f16_dpp
Public docs are apparently wrong: https://github.com/llvm/llvm-project/pull/79598#issuecomment-1933988048

Cc: mesa-stable

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27533>
2024-02-09 21:36:52 +00:00
Mark Janes
a52c1994aa intel/dev: generate declarations for struct intel_device_info
Serialization of intel_device_info requires the specification of all
aspects of the type declaration in Python.

To avoid duplication, use the Python type information to generate the
struct as well as the serialization implementation.

This step is implemented first, because it provides explicit types for
some anonymous structures within intel_device_info.  For example, the
'urb' member struct within intel_device_info cannot be serialized in a
C function unless we give it a type (eg, intel_device_info_urb_desc).

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
Mark Janes
13c7194525 intel/dev: specify struct intel_device_info type details in python
In preparation for generating struct intel_device_info, provide all
necessary details via python objects that describe it, including:

 - integer macro definitions
 - comments
 - array sizes
 - correct int types
 - enumeration groups
 - meaningful type names for inline struct members

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
Mark Janes
c40dacd4a8 util: add parson for handling json files
Release 1.5.3 (ba29f4eda9ea7703a9f6a9cf2b0532a2605723c3)
from https://github.com/kgabis/parson

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +00:00
Mark Janes
fb7240bef9 hasvk: add missing linker arguments
vulkan_icd_link_args was added for other vulkan drivers but not hasvk.
Without it, statically linked json-c symbols are wrongly exported.

Ref: 2b1e9b0fd6 ("anv: add linker script to fix android symbols")
Fixes: 78578a6ddb ("vk: move radv's linker symbols scripts for use in all drivers")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27540>
2024-02-09 21:01:05 +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
3579413aed anv: 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
José Roberto de Souza
f23395e2b9 anv: 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
José Roberto de Souza
e905bfe81b intel/common: Add functions to handle async vm bind
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
Felix DeGrood
11465e4b3a mesa-overlay: defer listening to socket until first frame
mesa-overlay with control arg fails to setup socket properly when multiple
adapters launched. First adapter listens to socket, blocking all remaining
adapters. This is a common occurrence with games using lauchers where the
launcher is also a vulkan app. Fixed by deferring socket listening to first
frame rendered, which should be the game.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27538>
2024-02-09 16:16:24 +00:00
Eric Engestrom
9beb9081fc ci_run_n_monitor: print the target regex before adding the X/N bit
To avoid showing something too complex to the user, especially since this isn't something they added themselves or can remove.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27530>
2024-02-09 15:58:10 +00:00
Eric Engestrom
7154c1eb77 ci_run_n_monitor: implicitly include parallel: jobs
This avoids the surprising behaviour where `--target jobname` works for
some jobs but not others, because gitlab adds `X/N` at the end of these
job names.

If the user does specify something like `jobname 1/.*` to only run the
first, the extra `\d+/\d+` is ignored, just like if the job isn't
`parallel:` and therefore doesn't end with `X/N`.

If the user really wants to fail to match parallel jobs (previous
behaviour), they can simply add a `$` at the end of the job name/regex
(but also, I don't see why someone would want that behaviour).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27530>
2024-02-09 15:58:10 +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
9c006d5dce nir/passthrough_gs: flesh out gs_in_prim
geometry shaders don't specify the input topology, only the class of topology.
normalize when generating a passthrough gs.

asahi will be more picky about this in the future.

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
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
Pierre-Eric Pelloux-Prayer
6c3a294eef radv: don't remove the blit queue from the device queues
I don't remember why I implemented it like this in !13959, but
AFAICT there's no need to manually remove this queue from vk_device's
queues list.

On the other hand, this hack causes issues if syncobj timeline isn't
supported; amdgpu always support timeline, but amdgpu over virtio-gpu
doesn't.

The issue is as follow: the sequence in vk_queue.c:

   case VK_QUEUE_SUBMIT_MODE_DEFERRED:
      vk_queue_push_submit(queue, submit);
      return vk_device_flush(queue->base.device);

Would fail to produce the expected result, because vk_device_flush would
fail to realize that the blit queue has some pending work because
"vk_foreach_queue(queue, device)" would never process the queue.

Then, the call to vk_drm_syncobj_export_sync_file() would fail, because
the syncobj handle was never used in a submit.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27412>
2024-02-09 09:20:52 +01:00
Eric Engestrom
716ed7d62a gitlab_gql: print error returned by server in --print-merged-yaml
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27535>
2024-02-09 08:01:20 +00:00