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
Rob Clark
79b907f941
tu/msm: Fix timeline semaphore support
...
Fixes: daefc6e2a4
("turnip: prep work for timeline semaphore 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
Corentin Noël
685fef1876
virgl/texture: Align destination box to block depth
...
In the case of a 3D texture, make sure to align to the block depth.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26005 >
2023-11-02 13:07:24 +00:00
Corentin Noël
b280ea863d
virgl: fill the array_size value when using PIPE_TEXTURE_CUBE
...
The cube texture type also requires array sizes.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26005 >
2023-11-02 13:07:24 +00:00
Rhys Perry
0a418561da
radv: skip radv_remove_varyings for mesh shaders
...
Fixes compilation of a Talos Principle 2 shader.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: 9fa9782c17
("radv: stop compiling a noop FS when the application doesn't provide a FS")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25659 >
2023-11-02 12:44:43 +00:00
Rhys Perry
ed12be533e
radv: call lower_array_deref_of_vec before lower_io_arrays_to_elements
...
nir_lower_io_arrays_to_elements does not support array derefs of vectors,
even when nir_deref_instr_is_known_out_of_bounds is fixed.
They can occur with mesh shaders.
Found by inspection.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25659 >
2023-11-02 12:44:43 +00:00
Alyssa Rosenzweig
570ed11303
asahi: Remove placeholder shader
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
2c54372760
agx: Use CL for texture lowerings
...
To demonstrate everything working, and the value of this approach.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
8ef7eec246
asahi: Add software-defined field to texture desc
...
We use this for buffer textures.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
eecd8390d0
asahi,agx: Plumb libagx
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
0be124b77e
asahi: Deserialize libagx when opening device
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
75fe90dab0
asahi: Pass valid memctx to open_device
...
Currently the argument is unused but that's about to change.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
cde7ca1683
asahi: Add asahi_clc infrastructure
...
Based on intel_clc, tuned for libraries. Targets serialized NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
a02e463484
asahi: Add folder for internal shaders
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
103e300e7f
asahi: Reexpress genxml pack macro
...
To let NIR unroll it. Workaround NIR bug.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
ed1b2f40fc
asahi: Unpack at 32-bit granularity
...
The way we already do for packs. This is more efficient.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
0df82f76c4
asahi: Make GenXML compatible with OpenCL
...
Adapt gen_pack.py to generate an OpenCL compatible header, capable of both
packing and unpacking but not printing (due to no known use case and no fprintf
in CL). This is useful as a building block for manipulating descriptors from
shader code, for example in texture lowering or device-generated commands.
To accomplish this, we need to inline in some CL-compatible variants of mesa
util functions (no doubles, etc), avoid FILE * use in the CL path, and use
__constant pointers where applicable for performance. Otherwise, there are
surprisingly few changes required, thanks mainly to CL 2.0 generic pointers.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
59499d8dbc
asahi: Fix agx_pack unrolling
...
The loop is supposed to execute exactly once, but the previous logic
inadvertently executes 0 or 1 times depending on whether dst is NULL (it never
is). Reexpress the loop to execute exactly once, eliminating the unnecessary
branch in this hot path. Noticed when reading the NIR of generated pack code.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
7193849f30
agx: Fuse ubitfield_extract
...
Similarly, let's get the win everywhere.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
5500e02a61
agx: Fuse (unmasked) extr_agx
...
This will clean up genxml unpack code and is needed for parity with the assembly
we write by hand. This way we get the win for all shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
0cde7b794c
agx: Vectorize load/stores
...
This helps CL shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
7f27f2e314
agx: Fix lower regular texture metadata
...
for buffer textures, we insert new blocks which invalidates dominance and
block index info... leads to end-to-end fails when shuffling pass order.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
a6afa48e86
clc: Add missing idep_vtn
...
From the libclc linking code. This should probably be split out but that seems
like potentially a task for another day. Avoids a linker error in the next
commit the easy way.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
f164edfe71
vtn: Add spirv_library_to_nir_builder feature
...
This new entrypoint takes in a SPIR-V blob and generates a header containing
a static inline nir_builder-family function for each function in the SPIR-V
library. The generated function will look for the function in the shader and, if
not found, insert a new nir_function with the appropriate signature -- to be
linked with the library later. Then, it will call the function, with the
appropriate gymnastics to handle return values as necessary.
This makes it super convenient to wrap CL libraries for use in a NIR pass.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
a2d3c74094
meson: Require clc for asahi
...
By the end of the series, this will become a hard dependency for the driver.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
01d0d94319
meson: Simplify clc expression
...
To make it easier to add more clc users later.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
b192f3c458
nir/builder: Add nir_call helper
...
This adds an idiomatic way to insert NIR function calls with the builder. Since
functions have variable numbers of arguments, this is a variadic function.
v2: Define with a variadic macro instead, for safety with the argument count.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
23bea25207
nir: Add nir_remove_non_exported
...
For libraries.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
6014f745d5
nir,vtn: Add exported bool to nir_function
...
For optimizing libraries.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
103d20e657
gitlab: Highlight .cl as C
...
It is close enough, and a lot better than the defaults when gitlab doesn't
recognize the file format as currently happens for .cl
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:46 +00:00
Alejandro Piñeiro
b509446c2c
docs/v3d: update v3d documentation
...
In order to include a reference to the Raspberry Pi 5, and that the
support for 3.3 and 4.1 got dropped.
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25851 >
2023-11-02 11:59:08 +01:00
Alejandro Piñeiro
87a673cac4
broadcom/cle: rename xml files
...
This has been confusing for some time, as from a xml file with the
suffix v33 (so suggesting just one version) we were generating the
headers for v33, v40, v41 and v71.
So now there is a header for the vc4 driver, and one header for the
v3d/v3dv (so v3d "platform") drivers.
FWIW, this means that now the name of the original xml and the header
files generated doesn't maintain a so similar pattern, but again the
equivalence were not there anyway.
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25851 >
2023-11-02 11:59:08 +01:00
Alejandro Piñeiro
9c4829473a
broadcom/cle: remove v33 and v41 from xml definition
...
For the case of v41 is mostly update to v42.
Acked-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25851 >
2023-11-02 11:59:08 +01:00