Commit Graph

180049 Commits

Author SHA1 Message Date
David Rosca
007ff4ea00 radeonsi/uvd: Implement destroy_fence vfunc
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:00 +00:00
David Rosca
fdc8da6eb4 radeonsi/vce: Implement destroy_fence vfunc
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991>
2023-11-03 19:35:00 +00:00
Juan A. Suarez Romero
8f621174da v3d: use kmsro to create drm screen on real hw
When using `MESA_LOADER_DRIVER_OVERRIDE=v3d` in real hw, use kmsro to
create the drm screen, which is actually what happens when not exporting
such variable.

This avoids confusions when using the envvar in real hardware and starts
to fail.

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/26007>
2023-11-03 18:50:37 +00:00
Chia-I Wu
ef724ab695 vulkan, tu, pvr: remove vk_render_pass_state::render_pass
The spec says

  A VkRenderPass or VkPipelineLayout object passed as a parameter to
  create another object is not further accessed by that object after the
  duration of the command it is passed into.

The object could have been destroyed if we get the pointer from a
pipeline library.  Since it has no user now, let's remove it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26000>
2023-11-03 17:23:30 +00:00
Chia-I Wu
227300345e radv: stop using vk_render_pass_state::render_pass
vk_render_pass_state::pipeline_flags is derived from
vk_get_pipeline_rendering_flags and has the info we need.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10074
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26000>
2023-11-03 17:23:30 +00:00
David Rosca
c638e61ef5 frontends/va: Map decoder and postproc surfaces for reading
If application requests to map surface that was most recently used
as decoder or postproc target and also doesn't explicitly set the
map flags (vaMapBuffer2) it's very likely the intent is to read from
this surface, so we need to map it as such.

This fixes regression on radeonsi where mapping NV12 surfaces for
reading would fail with applications using vaDeriveImage. The reason
for this is that the VA frontend doesn't allow vaDeriveImage for
interlaced surfaces so the applications would use vaGetImage fallback,
but radeonsi doesn't allocate NV12 surfaces as interlaced anymore.

This also fixes mapping other formats surfaces (P010, RGBx, ...)
for reading, which never worked before.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9935
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10048

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26008>
2023-11-03 17:04:00 +00:00
Rob Clark
33de58154f freedreno: Handle DRM_FORMAT_MOD_QCOM_TILED3 import
This is something that we could allocate and export.  So we must import
them as well.

Fixes import failures in spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25995>
2023-11-03 15:43:09 +00:00
Rob Clark
a95ea2b6d6 freedreno: Fix modifier determination
Now that we have TILED2 and TILED3 modifiers, we should handle those
cases.

Fixes assert that modifier != INVALID in
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25995>
2023-11-03 15:43:09 +00:00
Rob Clark
6ac133c646 freedreno/drm: Fix race in zombie import
The check for the zombie case (racing with final unref of the bo vs
removal from table) must be atomic.

Fixes spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread

Fixes: a192923f99 ("freedreno/drm: Restart import on zombie race")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25995>
2023-11-03 15:43:08 +00:00
antonino
4a627af0e3 nir: don't take the derivative of the array index in nir_lower_tex
Previosuly when lowering to txd for sampler array the index would be
derived as well, therefore the resulting derivative would have been a
vec with one more component than what the txd instruction expects.

This patch truncates the coordinate vector in this case to make sure the
index is not derived.

Fixes: b154a4154b ("nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26012>
2023-11-03 12:53:11 +00:00
Gert Wollny
28b79b2ea5 r600/sfn: Fixup component count only if intrinsic has it
Fixes: 33d878e
   r600/sfn: Handle load_global in 64 to vec2 lowering

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
2023-11-03 12:25:39 +00:00
Gert Wollny
1662897294 r600: Link with libgalliumvl, when enabling rusticl this is needed
Fixes: 33673bcc2a
    rusticl: stop linking with libgalliumvl

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
2023-11-03 12:25:39 +00:00
Gert Wollny
022850ed05 r600: Add experimental get_compute_state_info
This callback is needed for rusticl, but the values that are returned
may be completely off.

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7420

v2: use r600_wavefront_size value

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>
2023-11-03 12:25:39 +00:00
Karol Herbst
7b41921504 nvc0: implement PIPE_CAP_TIMER_RESOLUTION
This allows rusticl to create profiling queues.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10042
Fixes: 660f2eabe1 ("gallium: add PIPE_CAP_TIMER_RESOLUTION")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26016>
2023-11-03 11:13:44 +00:00
duncan.hopkins
1039da1400 vulkan: added build dependencies for systems using non-standard prefixed X11 libs.
To get MacOS to build, some extra dependencies need to be added to a couple of build targets.
This mainly shows up when not installing the dependencies in the default prefix locations.
On MacOS, this happens when using a custom build of brew to install the dependencies to 'odd' locations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26022>
2023-11-03 10:46:27 +00:00
Eric Engestrom
47398c65ee ci/radeonsi: add another flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26020>
2023-11-03 09:20:32 +00:00
Samuel Pitoiset
fc9bab73a9 radv/ci: document one more flake test
This test consistently fails on some GPUs (already documented) but on
some others it's a flake. It's a known issue that should be fixed soon
in RADV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26019>
2023-11-03 09:16:54 +01:00
Jesse Natalie
5550c1daf4 dzn: Use vk_properties helper
Addresses part of https://gitlab.freedesktop.org/mesa/mesa/-/issues/9521
Required for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25998
to actually work correctly for Dozen

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26014>
2023-11-03 00:00:13 +00:00
Alyssa Rosenzweig
0038f95b66 asahi: Fix tools=all builds
don't need clc here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26017>
2023-11-02 18:51:57 -04:00
Connor Abbott
2313a517d2 v3d/ci: Remove minetest trace
For the same reason as the previous commit. For examples of commits
causing spurious changes see 8019a1b9 and d89ca14e.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25864>
2023-11-02 21:46:55 +00:00
Connor Abbott
16214710ca freedreno/ci: Remove minetest trace
I've repeatedly seen minor pixel changes due to changes that only affect
RA decisions, most recently in !22072. We changed the trace to hopefully
remove a use of texture() in control flow, but it seems there are more,
or the problem is something slightly different like reading
uninitialized values. On the other hand minetest has never actually
caught an issue for me that some other trace hasn't also caught. Just
remove it.

Cc: mesa-stable
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25864>
2023-11-02 21:46:55 +00:00
Connor Abbott
e8b3006bfd util/rb_tree: Add augmented trees and interval trees
An "augmented tree" is a tree with extra data attached which flows from
the leaves to the root. An "interval tree" is a datastructure of
(potentially-overlapping) intervals where, in addition to inserting and
removing intervals, we can quickly lookup all the intervals which
overlap a given interval.

After describing red-black trees, CLRS explains how it's possible to
implement an interval tree using an augmented red-black tree where the
nodes are ordered by interval start and each node also stores the
maximum interval end for its entire subtree.

Implement the interval tree extension described by CLRS. Iterating over
all overlapping intervals is actually an exercise, so we have to solve
the exercise. The recursive solution has been re-written to use the
parent pointers to avoid needing a stack, similarly to rb_tree_first()
and rb_node_next().

For now, we only implement unsigned intervals, but the core algorithms
are all abstracted to allow other types. There's still some boilerplate,
but it's the best that can be done in C.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22071>
2023-11-02 21:03:46 +00:00
Connor Abbott
767e68972e util/rb_tree: Fix editorconfig
rb_tree has 4 space tabs, unlike everything else in util. We should
probably retab it, but for now add an editorconfig so that at least
people's editors aren't messed up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22071>
2023-11-02 21:03:46 +00:00
Faith Ekstrand
1793adbd3a nir/validate: Allow array derefs on vectors on function/shader_temp
This is required by OpenCL.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
0b3b4da82a nir: Handle array-deref-of-vec in var split passes
The changes are pretty straightforward.  For vector splitting, we just
ignore those vectors for now.  We could potentially handle array derefs
with a constant index (and probably should) but that's left for later.
For now, I'm mostly concerned with correctness of the pass.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
6bc8567bb9 nir: Handle array-deref-of-vec in vars_to_ssa
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7746
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
68c54c994a nir/types: Support vectors in glsl_get_length()
This makes it consistent with glsl_get_array_element() which returns the
scalar type for vectors, column type for matrices, and array element
type for arrays.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
1e1c450659 nir/lower_io_to_vector: Only call glsl_get_length() on arrays
We assumed that calling it on vectors would return 0 and then did a
MAX2(length, 1) to get 1 for vectors.  Instead, use a ternary so we
don't make assumptions about non-sensical values.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Karol Herbst
5db458eb2d ir2: Stop assuming glsl_get_length() returns 0 for vectors
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
2db20af82e v3d: Stop assuming glsl_get_length() returns 0 for vectors
Checking for whether or not it's a plain vector is actually what we want
anyway. There's no point in handling arays of length 1.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
ed79690196 vc4: Stop assuming glsl_get_length() returns 0 for vectors
Instead, check if it's a vector or scalar and use 1 explicitly.  In FS
output case where we were only using it assert we don't have any arrays,
assert that directly.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Karol Herbst
d17dc3e9cd nir: Stop assuming glsl_get_length() returns 0 for vectors
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
a1f3c5eea7 nir: Add asserts to nir_phi_builder_value_set_block_def
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
5adb335507 nir: Use nir_builder to insert movs
Also, leave a big comment about why we're inserting movs and not just
propagating SSA values directly.  Hopefully this will prevent idiots
like me from getting clever and thinking they can delete that mov. 😅

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Faith Ekstrand
15ab4d397f nir: Handle wildcards with casts in copy_prop_vars
If we're propagating a copy from a cast where the copy copies an entire
array, we end up with something like &((S *)ssa_N)->f[*] in the source
where a wildcard has a cast in its parent chain.  If we then try to
propagate the read into a non-wildcard array load, we have to specialize
the wildcard.  This breaks because nir_build_deref_follower() doesn't
handle casts.  Since we know a priori that, because wildcards are only
generated by copy_deref on arrays, we cannot have a cast with a wildcard
parent so simply chasing the source deref to the first wildcard will
ensure that any casts in the deref are handled properly.

Fixes: ba2bd20f87 ("nir: Rework opt_copy_prop_vars to use deref instructions")
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
2023-11-02 20:28:46 +00:00
Yiwei Zhang
ae3b022fa0 venus: fix query feedback batch leak and race upon submission
Summary:
- fixed the combined query batches leak
- fixed the race condition of accessing feedback cmd pool
- very scoped code refactor

Cc: 23.3 <mesa-stable>
Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25988>
2023-11-02 17:46:32 +00:00
Jesse Natalie
d9fada16b9 d3d12: Don't support displaytargets that can't be supported by GDI/DXGI
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25979>
2023-11-02 17:11:33 +00:00
Jesse Natalie
d4ed1ea31e winsys/gdi: Update is_displaytarget_format_supported to reflect reality
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25979>
2023-11-02 17:11:33 +00:00
Jesse Natalie
823d40db4a winsys/gdi: Handle 4444 and 1010102 texture formats
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25979>
2023-11-02 17:11:33 +00:00
Jesse Natalie
87c5589605 wgl: Take pixelformat color channels into account for choosing a PFD
Otherwise there's no way to target PIPE_FORMAT_B4G4R4A4_UNORM instead
of the B5G6R5 or B5G5R5A1 if those are supported. This gets the behavior
closer to the Windows PFD selection.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25979>
2023-11-02 17:11:33 +00:00
Rohan Garg
2444a3cd46 intel/compiler: migrate WA 14013672992 to use WA framework
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26006>
2023-11-02 16:39:25 +00:00
Konstantin Seurer
11282598e6 radv: Add radv_nir_lower_hit_attrib_derefs_tests
Tests hit attrib lowering for various variable/type configurations.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271>
2023-11-02 15:48:36 +00:00
Konstantin Seurer
f51227d253 radv/clang-format: Do not indent C++ modifiers
Turns

class asd {
 private:
};

into

class asd {
private:
};

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271>
2023-11-02 15:48:36 +00:00
Konstantin Seurer
ba8d3afa56 radv/nir: Handle boolean hit attribs
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271>
2023-11-02 15:48:36 +00:00
Konstantin Seurer
3a69424e09 radv/nir: Add radv_nir_lower_hit_attrib_derefs
Move out the pass so it can be unit tested.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271>
2023-11-02 15:48:36 +00:00
Konstantin Seurer
b7c582e5c7 radv: Add RADV_MAX_HIT_ATTRIB_DWORDS
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271>
2023-11-02 15:48:36 +00:00
duncan.hopkins
4ef573735e glx: fix automatic zink fallback loading between hw and sw drivers on MacOS
The combination of defines used when compile the code on MacOS is hiding variables.
Patch allows basic MacOS build to compile and run.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
2023-11-02 15:08:17 +00:00
duncan.hopkins
c8b64452c0 dri: added build dependencies for systems using non-standard prefixed X11 libs.
To get MacOS to build, some extra dependencies need to be added to a couple of build targets.
This mainly shows up when not installing the dependencies in the default prefix locations.
On MacOS, this happens when using a custom build of brew to install the dependencies to 'odd' locations.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
2023-11-02 15:08:17 +00:00
duncan.hopkins
96d55d784c util: Update util/libdrm.h stubs to allow loader.c to compile on MacOS.
MacOS does not have the libdrm libraries so is missing xf86drm.h.
util/libdrm.h already has a collection of stubs for systems that do not support the libraries.

A compile on MacOS will fail with the source that uses newer drm functions and structures.
Update adds in missing items that MacOS code needs to compile and run.
New code is copied from the public repository: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/xf86drm.h

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
2023-11-02 15:08:17 +00:00
Rob Clark
ceeab44fd1 tu/virtio: Fix timeline semaphore support
Fixes: f17c5297d7 ("tu: Add virtgpu support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25981>
2023-11-02 14:32:36 +00:00