Rhys Perry [Tue, 31 Jan 2023 16:15:50 +0000 (16:15 +0000)]
aco: make IDSet sparse
Improves compilation time of huge shaders.
A ray tracing pipeline of Hellblade: Senua's Sacrifice compiles in about
half the time, with this patch.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8179
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21022>
Asahi Lina [Fri, 3 Mar 2023 08:15:54 +0000 (17:15 +0900)]
asahi: Fix scissor culling check when out of bounds for FB/viewport
Fixes a bunch of the `assert(maxx > minx && maxy > miny)` failures in
dEQP-EGL and probably others.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21678>
Asahi Lina [Fri, 3 Mar 2023 12:35:56 +0000 (21:35 +0900)]
asahi: Do not overread user index buffers
We need to align the extent to 4 for the GPU, but we can't copy more
than the original size out of the user buffer. Always alloc the exact
size we need.
This does mean the GPU gets an IB extent that could include some other
stuff later in the pool, if not aligned. This is probably safe? Given
the base alignment, it should never cross a page boundary and fault or
anything like that.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21686>
José Roberto de Souza [Fri, 21 Oct 2022 15:58:11 +0000 (08:58 -0700)]
iris: Add iris_bo_set_caching()
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/21688>
José Roberto de Souza [Fri, 21 Oct 2022 14:19:59 +0000 (07:19 -0700)]
iris: Move iris_bo_madvise() to i915/iris_bufmgr.c
Start to split functions that are not in hot paths to specific i915
files.
Also making it static as iris_bo_madvise() is only called from
iris_bufmgr.c and adding a enum iris_madvice to be used among all
backends.
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/21688>
Rhys Perry [Wed, 1 Mar 2023 17:57:07 +0000 (17:57 +0000)]
aco/tests: add tests for v_fma_f32 with 2 fp16 literals
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21633>
Lionel Landwerlin [Fri, 3 Mar 2023 09:36:55 +0000 (11:36 +0200)]
blorp: add dependency on idep_intel_dev
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
3c9a8f7a6d ("intel/dev: generate helpers to identify platform workarounds")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8421
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21679>
Marcin Ślusarz [Fri, 3 Mar 2023 10:53:52 +0000 (11:53 +0100)]
crocus/meson: add back dependency on libintel_dev
Fixes:
a0fa31bcdd8 ("intel/dev: create a helper dependency for libintel_dev")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21679>
Lionel Landwerlin [Sun, 1 Jan 2023 22:58:46 +0000 (00:58 +0200)]
anv: add gfx9 generated draw support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 16:26:03 +0000 (18:26 +0200)]
anv: remove unused item_count parameter
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Sun, 1 Jan 2023 22:42:59 +0000 (00:42 +0200)]
anv: use a list of generated shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Sun, 1 Jan 2023 19:08:04 +0000 (21:08 +0200)]
anv: move common shader code into header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Sat, 31 Dec 2022 17:00:34 +0000 (19:00 +0200)]
anv: pack more data into generated draws input
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Sat, 31 Dec 2022 14:16:15 +0000 (16:16 +0200)]
anv: use 64bit int support in generation shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Fri, 30 Dec 2022 12:12:29 +0000 (14:12 +0200)]
anv: rename generated draws for Gfx11
We'll need different shaders for Gfx9
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 00:01:48 +0000 (02:01 +0200)]
anv: use a single generation shader for indirect draws
The indirect draw count shader can be used as a more generic case of
the indirect draw one. We'll never enter the last condition of the
shader (writing the MI_BATCH_BUFFER_START) with non count variants of
draws.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Thu, 5 Jan 2023 17:55:34 +0000 (19:55 +0200)]
anv: remove MI_NOOPs at the end of the generation batch
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Thu, 5 Jan 2023 17:38:22 +0000 (19:38 +0200)]
anv: make sure mi_memcpy lands before push constant loads
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
e2dc32d755 ("anv: move functions around to plan for generated draws")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Thu, 5 Jan 2023 15:30:19 +0000 (17:30 +0200)]
anv: fix indirect draws VF cache tracking of index buffer
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
e2dc32d755 ("anv: move functions around to plan for generated draws")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Tue, 3 Jan 2023 00:50:54 +0000 (02:50 +0200)]
anv: fix 3DSTATE_PS emission in generation shaders
We have to use the helper and also were missing the vector mask
programming.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 23:01:19 +0000 (01:01 +0200)]
anv: remove commented code
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 16:48:37 +0000 (18:48 +0200)]
anv: remove pre hasvk split assert
With softpin we should not always expect a BO in addresses.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Thu, 5 Jan 2023 19:22:01 +0000 (21:22 +0200)]
anv: limit push constant dirtyness with generation shaders
We only use the fragment shader push constants.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 23:01:00 +0000 (01:01 +0200)]
anv: correctly program 3DSTATE_SF in generation shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 02:17:53 +0000 (04:17 +0200)]
anv: remove BTI related flush in generation shaders
Earlier versions of the generation shaders were using the binding
table. We since switch to A64 messages. So the flush can be removed.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Sun, 1 Jan 2023 23:05:26 +0000 (01:05 +0200)]
anv: remove copied code from generation shader
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Mon, 2 Jan 2023 16:20:48 +0000 (18:20 +0200)]
anv: fix generated forward jump with more than 67M draws
The issue here is that for draw indirect count variants, we want to
jump after the last generated draw call to the next location where
commands are. But if we have more than 67M draws (8k * 8k chunks), we
only know the location once we've generated each of the 8k * 8k
chunks.
This change adds a CPU side pointer in the push constant struct so
that we can create a single linked list of chunks to edit and go
through to write the correct jump address after all the generated
space has been allocated.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Thu, 5 Jan 2023 13:30:33 +0000 (15:30 +0200)]
anv: correctly reset generation address on command buffer reset
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Thu, 5 Jan 2023 13:31:39 +0000 (15:31 +0200)]
anv: fix incorrect parameter
cmd_buffer_update_dirty_vbs_for_gfx8_vb_flush takes a value RANDOM/SEQUENTIAL. Not a boolean.
Fortunately this worked okay because true == RANDOM
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Lionel Landwerlin [Sun, 1 Jan 2023 19:08:32 +0000 (21:08 +0200)]
util/glsl2spirv: add support for include directive
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Eric Engestrom [Thu, 23 Feb 2023 17:34:30 +0000 (17:34 +0000)]
panfrost/ci: add EGL tests
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21504>
Lionel Landwerlin [Thu, 2 Mar 2023 16:44:45 +0000 (18:44 +0200)]
anv: pull Wa_14016118574 out of some loop not changing state
The WA is meant to be here to apply some state that is not propagated
properly inside the HW. But if you have a loop like :
for ( ... ) {
emit(3DPRIMITIVE, some param);
}
You're not really changing any state, just push more draws into the
pipeline.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
f2645229c2 ("anv: implement Wa_14016118574")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21660>
Lionel Landwerlin [Thu, 2 Mar 2023 16:35:01 +0000 (18:35 +0200)]
anv: fixup condition for Wa_14016118574
We don't want the WA to kick-in if it's not point/line topology.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
f2645229c2 ("anv: implement Wa_14016118574")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21660>
Samuel Pitoiset [Fri, 17 Feb 2023 17:14:09 +0000 (18:14 +0100)]
radv/ci: adjust timeouts for Vega10 and Renoir
With latest CTS it takes much more time.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21390>
Samuel Pitoiset [Fri, 17 Feb 2023 14:57:35 +0000 (15:57 +0100)]
ci: uprev CTS to 1.3.5.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21390>
Samuel Pitoiset [Wed, 1 Mar 2023 17:19:39 +0000 (18:19 +0100)]
radv: stop allocationg the attr ring BO for compute queues on GFX11
Only needed for graphics. This saves ~8Mib of 32-bit VRAM per compute
queue.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21632>
José Roberto de Souza [Fri, 10 Feb 2023 18:19:19 +0000 (10:19 -0800)]
iris: Add initial skeleton of kmd backend
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/21369>
José Roberto de Souza [Fri, 10 Feb 2023 18:19:19 +0000 (10:19 -0800)]
iris: Use DRM_IOCTL_I915_GEM_CREATE_EXT in all supported kernels
As we start to refactor the iris code base to support Xe KMD here I'm
dropping DRM_IOCTL_I915_GEM_CREATE usage as much as possible and
unifying all graphics memory allocation calls to
DRM_IOCTL_I915_GEM_CREATE_EXT.
The kernel version that implemented DRM_I915_QUERY_MEMORY_REGIONS uAPI
also implemented DRM_IOCTL_I915_GEM_CREATE_EXT so we can use that
to safely call DRM_IOCTL_I915_GEM_CREATE_EXT.
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/21369>
José Roberto de Souza [Fri, 10 Feb 2023 19:31:15 +0000 (11:31 -0800)]
iris/bufmgr: Add i915_gem_set_domain()
Avoids code duplication.
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/21369>
José Roberto de Souza [Thu, 27 Oct 2022 20:08:10 +0000 (13:08 -0700)]
iris: Convert drm_i915_gem_memory_class_instance to intel_memory_class_instance
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/21369>
José Roberto de Souza [Thu, 9 Feb 2023 16:16:42 +0000 (08:16 -0800)]
intel/dev: Query and compute hardware topology for Xe
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/21368>
José Roberto de Souza [Thu, 9 Feb 2023 16:13:14 +0000 (08:13 -0800)]
intel/dev: Implement Xe functions to handle hwconfig
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/21368>
José Roberto de Souza [Thu, 9 Feb 2023 16:05:24 +0000 (08:05 -0800)]
intel/dev: Implement Xe functions to fill intel_device_info
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/21368>
José Roberto de Souza [Thu, 9 Feb 2023 15:28:07 +0000 (07:28 -0800)]
intel/dev: Add INTEL_KMD_TYPE_XE
As mentioned in the previous patch, if intel-xe-kmd is disabled
it will fail to detected in run time but it will still compile all
Xe files.
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/21368>
José Roberto de Souza [Mon, 19 Dec 2022 17:28:00 +0000 (09:28 -0800)]
intel: Add Meson parameter to enable Xe KMD support
The plan is to compile all the Xe files but in run time it will fail
to detect the KMD loaded and it will fall back to software
rendering(if build).
Compiling Xe files makes sure newer commits don't break Xe even if
developers don't have Xe enabled in their build folder.
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/21368>
José Roberto de Souza [Thu, 4 Aug 2022 21:16:46 +0000 (14:16 -0700)]
intel: Pull in xe_drm.h
This is the uapi of the new Xe kernel driver.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21368>
Mark Janes [Wed, 1 Mar 2023 22:26:20 +0000 (14:26 -0800)]
intel/dev: Print required workarounds with intel_dev_info
With the addition of workarounds, the output from this tool is more
verbose than some users will want. Provide optional parameters for
enabling hwconfig and workaround details.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21639>
Hans-Kristian Arntzen [Wed, 30 Nov 2022 11:08:56 +0000 (12:08 +0100)]
radv: Expose VK_EXT_swapchain_maintenance1.
Passes dEQP-VK.wsi.*.maintenance1.*.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Wed, 11 Jan 2023 10:49:49 +0000 (11:49 +0100)]
wsi/win32: Implement VK_EXT_swapchain_maintenance1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Jesse Natalie <jenatalie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Thu, 8 Dec 2022 15:48:12 +0000 (16:48 +0100)]
wsi/display: Implement EXT_swapchain_maintenance1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Wed, 30 Nov 2022 16:18:00 +0000 (17:18 +0100)]
wsi/wayland: Implement EXT_swapchain_maintenance1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Wed, 30 Nov 2022 16:17:39 +0000 (17:17 +0100)]
wsi/common: Add function to modify present mode.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Wed, 30 Nov 2022 11:21:22 +0000 (12:21 +0100)]
wsi/common: Add comment about DEFERRED_ALLOCATION_BIT_EXT.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Wed, 30 Nov 2022 11:07:58 +0000 (12:07 +0100)]
wsi/common: Implement swapchain present fence.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Thu, 8 Dec 2022 16:08:21 +0000 (17:08 +0100)]
wsi/x11: Implement EXT_swapchain_maintenance1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Hans-Kristian Arntzen [Thu, 8 Dec 2022 16:07:52 +0000 (17:07 +0100)]
wsi/common: Add common implementation of vkReleaseSwapchainImagesEXT.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235>
Marek Olšák [Thu, 2 Mar 2023 23:04:22 +0000 (18:04 -0500)]
lavapipe/ci: add a new flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Sun, 6 Nov 2022 20:58:47 +0000 (15:58 -0500)]
amd: lower multi-component subdword SSBO loads in NIR
because the hw and LLVM only support subdword single-component SSBO loads,
and ac_nir_to_llvm splits multi-component loads because of that, which is
inefficient.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Sat, 29 Oct 2022 21:29:37 +0000 (17:29 -0400)]
amd: lower subdword UBO loads in NIR
This fixes broken subdword UBO loads with LLVM.
It's only needed for LLVM, but it's done for both LLVM and ACO because
the pass can be fully validated only with ACO and the Vulkan CTS right now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Thu, 3 Nov 2022 17:41:19 +0000 (13:41 -0400)]
ac/llvm: implement nir_op_unpack_32_4x8
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Sat, 5 Nov 2022 07:44:53 +0000 (03:44 -0400)]
aco: implement nir_op_unpack_32_4x8
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Sat, 29 Oct 2022 21:25:00 +0000 (17:25 -0400)]
ac/nir: add ac_nir_lower_subdword_loads to lower 8/16-bit loads to 32 bits
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Sat, 5 Nov 2022 07:45:20 +0000 (03:45 -0400)]
nir: skip nir_op_unpack_32_4x8 in nir_lower_alu_width
The pass can't handle it just like the other unpack opcodes and generates
invalid NIR.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Marek Olšák [Sat, 29 Oct 2022 21:28:43 +0000 (17:28 -0400)]
nir: return progress from nir_lower_io_to_scalar
oversight?
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19399>
Faith Ekstrand [Sat, 25 Feb 2023 00:04:49 +0000 (18:04 -0600)]
intel/nir: Limit unaligned loads to vec4
This probably doesn't affect Vulkan or GL because they can't have
anything bigger than a vec4 anyway unless it's a u64vec4 and those have
to be at least 8B aligned. This may affect CL apps if they use
__attribute__((packed)) on something with big vectors, depending on how
LLVM decides to translate that.
Fixes:
f8aa83f0c86e ("intel/nir: Use nir_lower_mem_access_bit_sizes()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Mon, 27 Feb 2023 14:45:22 +0000 (08:45 -0600)]
nir: Handle wider unaligned loads in lower_mem_access_bit_size
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Mon, 27 Feb 2023 14:50:50 +0000 (08:50 -0600)]
nir: Make chunk_align_offset const in lower_mem_load()
This should make things more clear than changing the value from earlier
in the loop. Also, rename chunk_offset to load_offset so they match.
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Wed, 1 Mar 2023 15:10:20 +0000 (09:10 -0600)]
nir: Rename nir_mem_access_size_align::align_mul to align
It's a simple alignment so calling it align_mul is a bit misleading.
Suggested-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Mon, 27 Feb 2023 14:42:46 +0000 (08:42 -0600)]
nir: Rename align to whole_align in lower_mem_load
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Mon, 27 Feb 2023 14:33:02 +0000 (08:33 -0600)]
nir: Add a combined alignment helper
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@colllabora.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Fri, 24 Feb 2023 20:09:35 +0000 (14:09 -0600)]
nir: Add UBO support to nir_lower_mem_access_bit_sizes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Tue, 21 Feb 2023 17:45:49 +0000 (11:45 -0600)]
nir: Add mode filtering to lower_mem_access_bit_sizes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Faith Ekstrand [Fri, 24 Feb 2023 20:26:44 +0000 (14:26 -0600)]
nir: Check against combined alignment in nir_lower_mem_access_bit_sizes
Checking against align_mul is insufficient if align_offset > 0. We need
to check against the combined alignment instead.
Fixes:
2e2d7803c7f1 ("nir: Add a load/store bit size lowering pass")
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21524>
Patrick Lerda [Thu, 2 Mar 2023 17:09:04 +0000 (18:09 +0100)]
mesa/framebuffer: fix gl_framebuffer.resolve refcnt imbalance
Indeed, "resolve" is not freed at the gl_framebuffer destroy
stage.
For instance, this issue is triggered and detected with
"piglit/bin/fbo-depthstencil clear default_fb -samples=2 -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
Fixes:
f5bde99cbdd2 ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21663>
Marek Olšák [Sat, 25 Feb 2023 22:24:56 +0000 (17:24 -0500)]
radeonsi: assume shader is never NULL in si_emit_shader_*
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 25 Feb 2023 22:10:43 +0000 (17:10 -0500)]
radeonsi: simplify encoding VGPRS and SGPRS
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 25 Feb 2023 22:09:06 +0000 (17:09 -0500)]
radeonsi: check the pm4.reg_va_low_idx assertion unconditionally
This is not a hot path. We can always do this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 25 Feb 2023 22:06:06 +0000 (17:06 -0500)]
radeonsi: add si_pm4_set_reg_va to simplify setting reg_va_low_idx for RGP
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 25 Feb 2023 21:56:25 +0000 (16:56 -0500)]
radeonsi: reindent code in si_state_binning.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Tue, 21 Feb 2023 16:33:13 +0000 (11:33 -0500)]
radeonsi: don't merge SET_* packets that have a different index in si_pm4_state
Oops.
Fixes:
c8e2c6faf64 ("radeonsi: use SET_SH_REG_INDEX with index=3 for registers containing CU_EN")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sun, 19 Feb 2023 09:42:01 +0000 (04:42 -0500)]
radeonsi: reorganize si_emit_framebuffer_state for better readability
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 18 Feb 2023 09:50:18 +0000 (04:50 -0500)]
radeonsi: remove Smart Access Memory because CPU access has large overhead
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8176
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sun, 26 Feb 2023 11:34:18 +0000 (06:34 -0500)]
radeonsi/ci: update flakes and gfx8-polaris11 results
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 25 Feb 2023 23:50:23 +0000 (18:50 -0500)]
amd/rtld: allow 64K LDS for all shader stages except for gfx6
Gfx6 can only use 32K LDS per workgroup.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Tue, 21 Feb 2023 17:22:38 +0000 (12:22 -0500)]
amd: massively simplify how info->spi_cu_en is applied
Instead of having ac_set_reg_cu_en that sets the register, replace it with
ac_apply_cu_en that only returns the modified register value,
which allows a large simplification in both drivers because a lot of code
becomes duplicated after it's switched to ac_apply_cu_en.
RADV also didn't apply it to a few registers. Fixed.
This removes 82 lines of code in total.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 25 Feb 2023 21:00:50 +0000 (16:00 -0500)]
ac/nir: don't use load_esgs_vertex_stride_amd on gfx6-8
An improvement for
9f1e6d8f70a8fa2c174e0070c4331f5f178e6f1.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 18 Feb 2023 08:54:27 +0000 (03:54 -0500)]
amd: query cache sizes from the kernel
Also rename l1_cache_size -> tcp_cache_size. L1 means shader array cache.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 18 Feb 2023 08:40:41 +0000 (03:40 -0500)]
amd,radeonsi: change enabled_rb_mask to 64 bits
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Marek Olšák [Sat, 18 Feb 2023 08:39:42 +0000 (03:39 -0500)]
amd: update amdgpu_drm.h
From kernel commit
817714d9665e.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
Asahi Lina [Wed, 1 Mar 2023 09:58:39 +0000 (18:58 +0900)]
asahi: Pull device name from device struct
This isn't filled in yet, but will be once the UAPI init function is
added.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 09:58:13 +0000 (18:58 +0900)]
asahi: Add agx_bo_mmap() calls to transfer path
We have the prototype for this already.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 09:25:35 +0000 (18:25 +0900)]
asahi: Add result buffer to context/batches
The result buffer is where the kernel places statistics and fault
information after the GPU executes a command. Dummy structure pending
UAPI.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 09:05:00 +0000 (18:05 +0900)]
asahi: Add agx_debug_fault() helper
We expect to forward GPU fault information to userspace. Since Mesa can
get that information, we can look up the fault address to log what was
the containing or nearest BO. Add a helper for that, so it can be called
from the driver.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 09:04:12 +0000 (18:04 +0900)]
asahi: Add APIs for DMA-BUF sync file import/export
These are generic ioctls, so it is safe to add them now.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 08:58:51 +0000 (17:58 +0900)]
asahi: Implement Linux driver scaffolding, sans UAPI
With macOS support out of the way, we can start implementing a lot of
the Linux driver interface and bookkeeping without actually adding the
UAPI proper. Let's do that to reduce the size of the UAPI patchset.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 08:35:37 +0000 (17:35 +0900)]
asahi: Align device submission API with upcoming UAPI
Nothing implemented, but this lets us get the batch tracking bits in,
including explicit sync/DMA-BUF integration which uses generic ioctls.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 08:27:35 +0000 (17:27 +0900)]
asahi: Add nocluster,sync,stats debug flags
These are only useful with the upcoming Linux UAPI, but there's no harm
in getting the debug scaffolding in now.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Asahi Lina [Wed, 1 Mar 2023 08:24:01 +0000 (17:24 +0900)]
asahi: Drop macOS backend
This might be useful in the future, but it is best reimplemented in
terms of the upcoming Linux UAPI instead of having parallel codepaths.
Let's drop it.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21662>
Yiwei Zhang [Thu, 2 Mar 2023 07:00:05 +0000 (23:00 -0800)]
venus: ensure invariance of buffer memory requirement size
Need to align the size for the initial cache miss.
Fixes:
ef255444c19 ("venus: switch to lazy VkBuffer cache")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21644>
Marek Olšák [Tue, 21 Feb 2023 05:27:58 +0000 (00:27 -0500)]
mesa: initialize VertexProgram._VaryingInputs before the first use
Noticed by code inspection.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21438>