Commit Graph

184127 Commits

Author SHA1 Message Date
Yiwei Zhang
8762b2fca1 egl: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
5a37340689 turnip: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
5df083eff7 radv: refactor to use DETECT_OS_ANDROID instead of ANDROID
Include a tiny refactor in radv_physical_device_get_supported_extensions
to avoid a false formatting issue.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
4fd4a6109d anv: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
a678b7434a hasvk: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
f245339120 venus: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
f06d7f6942 v3dv: refactor to use DETECT_OS_ANDROID instead of ANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
2dd95bc4b7 vulkan/runtime: refactor to use DETECT_OS_ANDROID instead of ANDROID
Also update vk_android_native_buffer.h to use __ANDROID__ directly.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Yiwei Zhang
f7d35be362 vulkan/util: drop redundant code gen from vk_extensions_gen.py
driver is now always 'vk'.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:48 +00:00
Yiwei Zhang
1e80a426c2 anv: extend implicit fencing support for case requiring implicit write
This change extends the coverage to ANV being the producer while
consumer is hardware encoder backed by iHD. So we'd apply implicit write
to bos backing render target images, which is mostly aligned with
i915_batch_submit tracking of the bos being writtern to.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27398>
2024-02-01 18:53:28 +00:00
Yiwei Zhang
be3af5acf6 anv: optimize the implicit fencing support of external memory
Previously we apply implicit sync to all external memory, which is a bit
redundant since we only need it for the dedicated image scenario (media
image imported into Vulkan). This change optimizes just like that while
also excluding wsi which has its own way of synchronizing with the
compositor.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27398>
2024-02-01 18:53:28 +00:00
Yiwei Zhang
55ac9a08b5 anv: refactor wsi_memory_allocate_info handling
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27398>
2024-02-01 18:53:28 +00:00
Eric Engestrom
f8078e278c docs/calendar: add 24.1 branchpoint and release schedule
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27403>
2024-02-01 18:02:46 +00:00
Roland Scheidegger
e04eed2827 auxiliary/draw: fix streamout overflow calculation
If the stride is larger than the component with the largest offset plus
the size of that component, it is still considered an overflow if there's
not enough space in the buffer to fit the whole stride-sized thing,
even when there would be enough space to actually write all components.
This is actually much simpler too, since we don't need to verify the
individual components at all (stride is guaranteed to be larger or equal
to the component with the largest offset plus the size of that component).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27368>
2024-02-01 17:10:40 +00:00
Eric Engestrom
eb4effeead v3d-rpi4-gl: reduce the parallelism from 10 to 8
We are slightly over-subscribed right now, with 21 merge jobs (10 vk
+ 10 gl + 1 traces) for 20 RPi4, so let's split the tests between
slightly fewer RPi4 and make each split job run for slightly longer,
because it also means that all the jobs start immediately, reducing the
overall delay in merging any MR that triggers this job.

The typical run time for this job was around 8 min with a 10-split; with
an 8-split it is now 9 min, which is still within the 10 min target and
well below the 15min limit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27391>
2024-02-01 13:45:59 +00:00
Lionel Landwerlin
03490ec019 vulkan/runtime: rework VK_KHR_dynamic_rendering_local_read state tracking
I missed a bunch of things like input tracking. Also take the
opportunity to rename things.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fe19405c46 ("vulkan/runtime: handle new dynamic states for attachment remapping")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27380>
2024-02-01 13:20:21 +00:00
Lionel Landwerlin
d7f5a815e3 vulkan/multialloc: bump max number to 16
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27380>
2024-02-01 13:20:21 +00:00
Erik Faye-Lund
4de62731f4 mesa/main: add support for EXT_texture_storage
It's sometimes really, really useful if GL_BGRA8 can be used as a
sized internal format, and the combination of EXT_texture_storage
and EXT_texture_format_BGRA8888 allows this (only when using
texture-storage, which is good enough in some cases). Until now,
we've only implemented ARB_texture_storage, and not the EXT
version.

So let's implement the EXT version as well, so we get the benefit
of the interaction here. This pulls in a lot of other similar
interactions as well, which also seems useful.

...because the ARB version is created from the EXT version, let's move
the EXT function definitions to the EXT extension. These should probably
have been suffixed with ARB in the ARB-version, but things seems to have
just ended up kinda confused. Oh well.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27222>
2024-02-01 12:30:58 +00:00
Alejandro Piñeiro
16f6f50ce4 v3dv: expose VK_EXT_depth_clip_enable
We already had the logic implemented, but it was never really tested
(there was a comment about that)

So the advantage of this is that we now test that code (in fact, there
were a small typo on that code).

There aren't too much CTS tests for this feature, but we gets tests
like this working:
dEQP-VK.clipping.clip_volume.depth_clip.*

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10527

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27386>
2024-02-01 11:33:38 +00:00
Luc Ma
03371887d5 gallium/u_blitter: Fix a few uninitialized fb_state
An uninitialized pipe_framebuffer_state maybe causes some issues
if someone is about to use its members such as `fb_state.layers`.

Signed-off-by: Luc Ma <luc@sietium.com>
Reported-by: Mark Zhou <mark@sietium.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27332>
2024-02-01 10:59:53 +00:00
Pierre-Eric Pelloux-Prayer
6f47e87a60 egl/drm: flush before calling get_back_bo
Similar to what was done for Wayland in 58f90fd03f:
the glthread unmarhsal thread needs to be idle to avoid
concurrent calls to get_back_bo.

Also the existing code flushed after setting dri2_surf->back
to NULL so a new back buffer was always allocated by the
glthread flush:

|---------------> dri2_drm_swap_buffers
| get_back_bo (back=0x55eb93c6c488) >       # First get_back_bo call
| get_back_bo (back=0x55eb93c6c488 age: 0)<
|                                           # dri2_surf->back = NULL
|-----> FLUSH
| get_back_bo (back=nil) >                  # Another get_back_bo call
| get_back_bo (back=0x55eb93c6c4c8 age: 3)<
|-----< FLUSH
|---------------< dri2_drm_swap_buffers

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10437
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27143>
2024-02-01 09:26:33 +00:00
Pierre-Eric Pelloux-Prayer
d9f15f8d9b meson: require libelf when radeonsi is built
radeonsi has a hard dependency on libelf so tell meson about this
requirement.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10240
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27295>
2024-02-01 09:28:41 +01:00
Pierre-Eric Pelloux-Prayer
e4f7754977 radeonsi: try to disable dcc if compute_blit is the only option
COMPUTE contexts have no blitter so there are no fallback to
si_can_use_compute_blit failing.

One solution would be to disable DCC globally when a COMPUTE context is
created but I'm not 100% sure it's a good idea.

Until then this commit can fix a number of cases and will also prevent
crashing if si_compute_blit fails.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10296
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27295>
2024-02-01 09:28:31 +01:00
Friedrich Vock
f66055a6a6 radv/rt: Write inactive node data in ALWAYS_ACTIVE workaround
Fixes: a9831caa ("radv/rt: Add workaround to make leaves always active")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27340>
2024-02-01 05:42:59 +00:00
Faith Ekstrand
60071f94e5 nvk: Use the upload queue for shader uploads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
aea4c9a913 nvk: Add an upload queue to nvk_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
2074e28a0d nvk: Add an upload queue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
e6f137e9ed nvk: Only map heaps that explicitly request maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
e162c2e78e nvk: Use VM_BIND for contiguous heaps instead of copying
This gets rid of our (fairly sketchy) heap resizing via stall-and-copy
and replaces it with VM_BIND.  We couldn't do this on the old nouveau
API but now that we can assume VM_BIND, it makes everything simpler.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
f0fad6ed17 nvk/queue: Only initialize the necessary engines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
ced7c5193e nvk/queue: Rework context state init
The queue now owns the nv_push and just invokes the per-engine functions
to fill it with context state init data.  This also splits out 3D and
compute into separate helpers and pulls M2MF off into its own thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
b02f83e5c6 nvk: Add an array of queue families to nvk_physical_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
86e79cd744 nvk: Move the nouveau_ws_context to nvk_queue
Otherwise, different queues aren't actually going to run independently.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
3273eaf52a nvk/queue: Refactor the push builder a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
88b19ccc3f nvk/queue: Pull DRM specfc stuff into nvk_queue_drm.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
88445fc12a nouveau/winsys: Allow only allocating a subset of engines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Faith Ekstrand
c4ea8ab527 nouveau/winsys: Re-order channel creation
Also, rework the fail gotos so they make a little more sense.  Since we
were already calling dealloc the first time a subchan fails, we may as
well just always use dealloc.  Worst case the ioctl fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205>
2024-02-01 03:51:08 +00:00
Timothy Arceri
ec4990ef41 glsl: remove now unused GLSL IR validate_geometry_shader_emissions()
We now use the nir version of this validation pass instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27377>
2024-02-01 01:53:15 +00:00
Timothy Arceri
ce3420394c glsl: use nir version of geom stream validation
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27377>
2024-02-01 01:53:15 +00:00
Timothy Arceri
f21e2e6229 glsl: add nir version of validate_geometry_shader_emissions()
We will use this to replace the GLSL IR version.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27377>
2024-02-01 01:53:15 +00:00
Eric Engestrom
cdfbd3323d docs: add sha256sum for 23.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27405>
2024-02-01 01:46:55 +00:00
Eric Engestrom
f140c5ed64 docs: update calendar for 23.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27405>
2024-02-01 01:46:55 +00:00
Eric Engestrom
7217e62b3e docs: add release notes for 23.3.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27405>
2024-02-01 01:46:55 +00:00
Dave Airlie
ff50e80574 zink: use sparse residency for buffers.
GL ARB_sparse_buffer allows unbound regions in buffers.
VK sparseBinding insists all regions must be bound before first use.

This means we need to use sparseResidencyBuffer to back GL
sparse buffers to get the same semantics.

Fixes GL and piglit sparse buffer tests on zink/nvk.

Fixes: c90246b682 ("zink: implement sparse buffer creation/mapping")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27404>
2024-02-01 01:08:22 +00:00
Eric Engestrom
4f6e4ae3d6 docs/release-calendar: add planned 24.0.x bugfix releases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:29:43 +00:00
Eric Engestrom
dd141af19e docs: add sha256sum for 24.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:18:15 +00:00
Eric Engestrom
8aa0ef0d01 docs: add release notes for 24.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:18:15 +00:00
Eric Engestrom
331e6f5b5e docs: update calendar for 24.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27402>
2024-02-01 00:11:28 +00:00
Dave Airlie
1d1a7f9d56 nvk: mem cannot be null in binding buffers/images.
Tom on discord pointed out a coverity warning in this area about
mem dereferences. Vulkan API states that mem must be non-NULL,
so remove those paths that are unused.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27255>
2024-01-31 22:57:57 +00:00
José Roberto de Souza
44b4fee786 iris: Avoid read of uninitialized value in blorp_clear_stencil_as_rgba()
In clear_depth_stencil() stencil_surf is defined but not initiaized.
Then in the same function if stencil_mask is calculated and if != 0
stencil_surf is initialized.
But blorp_clear_stencil_as_rgba() access stencil_surf before checking
stencil_mask, what could cause a read of a uninitialized valued.

clear_depth_stencil()
	struct blorp_surf stencil_surf;
	...
	uint8_t stencil_mask = clear_stencil && stencil_res ? 0xff : 0;
	if (stencil_mask) {
		...
		iris_blorp_surf_for_resource(&stencil_surf);
	}
	...
	blorp_clear_depth_stencil(stencil_mask, stencil_surf)
		blorp_clear_stencil_as_rgba(stencil_mask, stencil)
			if (surf->surf->format ...)
				....

Just inverting the order and checking stencil_mask first in
blorp_clear_stencil_as_rgba() fixes the issue.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27390>
2024-01-31 22:29:31 +00:00