Commit graph

172511 commits

Author SHA1 Message Date
Faith Ekstrand
7604697ec6 nvk: Implement shaderStorageImageMultisample
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9660
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
357720c5a7 nvk: Use different descriptor layouts for storage vs. sampled images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
86a462fb96 nvk: Stop pretending to handle Intel image intrinsics
This is probably just a copy+paste from ANV when I wrote the descriptor
code.  There's no actual point to pretending to do anything with these.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
bd9836a0b8 nvk: Use a HW generation names instead of chipsets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:12 +00:00
Faith Ekstrand
be1ef1a8d8 nil: Expose nil_pix_extent_sa()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Faith Ekstrand
418f8be9ea nil: Add a helper to view a MSAA image as samples
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Faith Ekstrand
ed6fd25a62 nil: Add support for larger textures on Pascal+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Faith Ekstrand
c3177e4fc2 nil: Whitespace fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28159>
2024-03-13 23:49:11 +00:00
Valentine Burley
72e1a57752 nvk: Reorder device features
Sort device features by KHR, EXT, vendor and then alphabetically within that.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28094>
2024-03-13 23:30:46 +00:00
Valentine Burley
94622ae491 nvk: Advertise VK_KHR_vertex_attribute_divisor
This is a promotion from the EXT, except the new property
supportsNonZeroFirstInstance which is already supported.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28094>
2024-03-13 23:30:46 +00:00
Dave Airlie
133c73da85 nvk: enable a mappable bar heap when rebar is disabled.
Now that we've resolved the kernel side issues, this should be fine
to expose on non-rebar systems.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28144>
2024-03-13 23:13:40 +00:00
Pavel Ondračka
647a2d1f6b r300/ci: enable nine tests
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27434>
2024-03-13 22:31:26 +00:00
David Heidelberg
045bc86ac9 ci/freedreno: mark fails resolved by "drm/msm/gem: Add metadata uapi"
This fails can be resolved by:
 - using https://patchwork.freedesktop.org/series/126031/ patchset on
   top of 6.6 (in our case)
 - using 6.8 or later kernel

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28048>
2024-03-13 21:43:17 +01:00
David Heidelberg
f1680f58b1 ci/freedreno: disable workarounds for Adreno 618, 630, and 660
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28048>
2024-03-13 21:42:59 +01:00
Yiwei Zhang
e0da118ab1 anv/hasvk: default image_read_without_format to true
The spv cap has the correct requirements to be satisfied before an app
can use it, so we can drop the redundant check here to be more robust.
Either of below is needed:
- VkPhysicalDeviceFeatures::shaderStorageImageReadWithoutFormat
- VK_VERSION_1_3
- VK_KHR_format_feature_flags2

v2: dropped unused variable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28117>
2024-03-13 19:29:04 +00:00
David Heidelberg
9c770f06c6 nine: drop useless and a bit too long line
Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: lorn10 <kle@bluewin.ch>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27971>
2024-03-13 18:58:15 +00:00
David Heidelberg
5b6a4b1c79 nine: fill missing licenses headers and copyrights
Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: lorn10 <kle@bluewin.ch>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27971>
2024-03-13 18:58:14 +00:00
David Heidelberg
81d3de71cd nine: convert licenses block to SPDX
Convert licensing information using ISO/IEC 5962:2021 to SPDX format.

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: lorn10 <kle@bluewin.ch>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27971>
2024-03-13 18:58:14 +00:00
Valentine Burley
ac5d529c65 nvk: Enable VK_KHR_shader_subgroup_uniform_control_flow
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9622

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28033>
2024-03-13 18:40:17 +00:00
David Tobolik
376d1e6667 rusticl: implement cl_khr_suggested_local_work_size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28020>
2024-03-13 17:59:09 +00:00
José Roberto de Souza
de94d98940 iris: Set BO_ALLOC_NO_SUBALLOC when allocating bo for slab
Without setting BO_ALLOC_NO_SUBALLOC iris_bo_alloc() will attempt to
get bo from slabs again.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27734>
2024-03-13 16:02:46 +00:00
Karol Herbst
4f165117dc nouveau/drm: remove nouveau_client::id
No idea what was the original purpose, but in the imported code we don't
need any of that.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:08 +00:00
Karol Herbst
9583fb8d00 nouveau/drm: drop unsued chan argument from nouveau_pushbuf_kick
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:08 +00:00
Karol Herbst
2101c9f2ac nouveau/drm: rely on nouveau_pushbuf::channel being always set
Now with the immediate flag being removed, we can rely on this and drop
some code.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
a28cd6b1de nouveau/drm: drop immediate parameter from nouveau_pushbuf_new
It was always set to true.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
1a4c2cba95 nouveau: call glsl_type_singleton_init_or_ref earlier
Fixes: 91029b7e87 ("nouveau: take glsl_type ref unconditionally")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
821f4c8d99 nouveau: import libdrm_nouveau
Most of the code is copied as is, but there are a couple of changes:
- drop pre nvif code
- nouveau_list -> list_head
- pthread_mutex_t -> simple_mtx_t
- nvif_unwrap removed
- no assignments in if statements
- nouveau_object_mthd -> nouveau_device_info
- reworked object allocation UAPI calls

Most of the reworked code was copied from NVK or a previous version of it

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Karol Herbst
a62fba6b62 nvk: use c.get_supported_arguments for compiler flags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +00:00
Lionel Landwerlin
b7719a9ed8 intel/fs: remove some unused send helpers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28152>
2024-03-13 14:37:48 +00:00
Erik Faye-Lund
0eaf7cca35 mesa: prefer read-format of RG for snorm
There's no good reason we want to read RGBA for SNORM RB textures. Let's
correct the preferred read-format here.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28120>
2024-03-13 10:19:33 +00:00
Corentin Noël
c9e66df39f zink: Add error logging on surface creation failure
Allows to differenciate which step has failed from the log message.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:31 +00:00
Corentin Noël
28854743dc zink: Change zink_get_surface to return a zink_surface
Allows to avoid systematic casting of its return value.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:31 +00:00
Corentin Noël
207db01829 zink: Make sure to not leak anything on surface creation failure
Change wrap_surface to always take the ownership of the wrapped surface and
always check for an allocated value to make sure to not crash here.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:31 +00:00
Corentin Noël
948695e1a4 zink: Move zink_surface_destroy before zink_create_surface
This will allow to reuse it inside zink_create_surface.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
27bde4b420 zink: Return early if the source could not have been acquired
Make the success case the main one.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
2c22e78619 zink: Separate the template from the wrapped surface
Allow to better understand the case when needs_mutable is true, differenciate
`base` from `surf` even if they are the same variable in most cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
55cdde758c zink: Use an intermediary variable for create_surface
Allows to NULL-check it afterwards.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Corentin Noël
faaa65a1a3 zink: Make wrap_surface return a zink_ctx_surface directly
Avoids to cast if back to zink_ctx_surface afterwards.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28025>
2024-03-13 09:26:30 +00:00
Lionel Landwerlin
2a77a46837 anv: return unsupported for FSR images on Gfx12.0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28131>
2024-03-13 08:52:24 +02:00
Caio Oliveira
e324fbbe68 intel/brw: Fix validation of accumulator register
The `stride` and `offset` attributes are meaningful for the "virtual"
register files (VGRFs, UNIFORMs and ATTRs).  Accumulator is an ARF so
validation should check `hstride` (part of the <V,W,H> triple) and `subnr`
instead.

Fixes: 12d7aaf2b8 ("intel/compiler: add more validation for acc register usage")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28059>
2024-03-13 03:23:30 +00:00
Caio Oliveira
db8022dc4d intel/brw: Use helper to create accumulator register
This ensure the region triple <V,W,H> is set correctly, in this case the
desired region is a sequential like <8,8,1>.  Without the helper the
sequence we get is <0,1,0> -- which the generator currently partially
adjusts when emitting code, but is not sufficient when doing validation
earlier.

The code generated code is slightly modified.  From crucible test
func.shader.subtractSaturate.uint in the fragment shader for SIMD8, the
diff looks like

```
 mov(8)          acc0<1>UD       g21<8,8,1>UD                    { align1 1Q $0.dst };
-add.sat(8)      g22<1>UD        -acc0<0,1,0>UD  g16<8,8,1>UD    { align1 1Q @1 $0.dst };
+add.sat(8)      g22<1>UD        -acc0<8,8,1>UD  g16<8,8,1>UD    { align1 1Q @1 $0.dst };
```

Note that without the patch generator adjusted the hstride for acc0 used
as destination (see brw_set_dest), but kept the src region as is.  For
the source, it is not clear to me why the <0,1,0> would work correctly
here since it is a scalar, but using <8,8,1> it is correct.

Fixes: 58907568ec ("intel/fs: Add SHADER_OPCODE_[IU]SUB_SAT pseudo-ops")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28059>
2024-03-13 03:23:30 +00:00
Mike Blumenkrantz
90cf8d14d6 zink: add a pass to strip out multisample storage image ops
ARB_shader_image_load_store requires that drivers can compile shaders
containing these tokens, but it doesn't require that they can execute
them. thus, deleting the multisample component is fine since these
shaders will never be executed

affects/fixes:
KHR-GL46.gl_spirv.spirv_validation_capabilities_test

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28078>
2024-03-13 03:03:24 +00:00
Mike Blumenkrantz
3f122761a1 zink: remove stale comments for DRLR usage
EXT_dynamic_rendering_local_read has arrived to rescue us from renderpasses
once and for all, so this is no longer necessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
e7e55dcfaf zink: be even stricter with shader object usage about blocking invalid usage
in some cases (e.g., ZINK_DEBUG=noopt), this will still need to compile a
full pipeline in order to provide valid behavior

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
485b4d9abe zink: add even more strict checks for separate shader usage
this blocks e.g., shader object usage with sample shading which
cannot be used with current vk spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
5910ce4b86 zink: always sync and replace separable progs even with ZINK_DEBUG=noopt
this otherwise breaks when shader variants are needed and aren't created

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
460c7eeecb zink: use the sanitized key in update_gfx_program_optimal()
this otherwise pulls in unused state values that are otherwise
sanitized away

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:38 +00:00
Mike Blumenkrantz
daf2f4a583 zink: rename optimal_key in update_gfx_program_optimal()
no functional changes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28017>
2024-03-13 02:42:37 +00:00
Lynne
ee476f3eda radv/av1: limit profile and bit depth to supported values
Same as with other codecs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28143>
2024-03-13 02:20:59 +00:00
Paulo Zanoni
18df1a81a8 anv/trtt: update GFX_TRTT_VA_RANGE for LNL
This register has changed a little bit for LNL.

While this fixes sparse with TR-TT, it is worth remembering that LNL
is using sparse with vm_bind by default.

v2: Use the proper value instead of hardcoding 0xF (Lionel).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27316>
2024-03-13 01:50:35 +00:00