Commit Graph

184162 Commits

Author SHA1 Message Date
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
Eric Engestrom
90b6f84c5e ci: when specifying a driver remove all other ones
If we need to specify a driver, it means several drivers could pick up this gpu;
ensure that the other driver can't accidentally be used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25434>
2024-01-31 21:50:03 +00:00
Tapani Pälli
a53af34664 anv: use workaround framework for Wa_22018402687
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27384>
2024-01-31 21:24:14 +00:00
Eric Engestrom
c35247ab20 vk/util: fix 'beta' check for physical device properties
`--beta` is a string, not a bool (although really it should be, but that's a bigger change).

Fixes: 083793a39d ("vulkan: Allow beta extensions for physical device properties")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27394>
2024-01-31 20:47:30 +00:00
Eric Engestrom
794ec7f0a1 vk/util: fix 'beta' check for physical device features
`--beta` is a string, not a bool (although really it should be, but that's a bigger change).

Fixes: a7141a6f8a ("vulkan: Allow beta extensions for physical device features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27394>
2024-01-31 20:47:30 +00:00
Max R
253968fc60 d3d10umd: Use flush_frontbuffer for Present
This is required to allow gallium drivers to display instead of
forcing software display. On llvmpipe/softpipe for sw display
gdi_sw_winsys will be used. While "hardware" drivers will be
able to call pfnPresentCb to present without CPU copy.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27333>
2024-01-31 20:04:38 +00:00
Max R
2b5e257690 winsys/gdi: Custom acquisition of hDC
In d3d10umd it is required to pass D3DKMT_PRESENT in
context_private of flush_frontbuffer, but wgl passes HDC in it.
To accomidate this when gdi_sw_winsys is created functions that
acquire and release hdc from context_private are passed.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27333>
2024-01-31 20:04:38 +00:00
Max R
be4b1c2639 winsys/gdi: Handle R8G8B8 formats
R8G8B8 is often used by d3d11 applications.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27333>
2024-01-31 20:04:37 +00:00
Sagar Ghuge
01636ee700 anv: Disable compression if we have concurrent sharing mode
If a resource is created with sharing mode CONCURRENT when multiple
queues are supported, we can't support the compression since we can't do
FULL_RESOLVE/PARTIAL_RESOLVE to construct the main surface data without
barriers.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27349>
2024-01-31 19:28:12 +00:00
Sagar Ghuge
9a4d951ef9 vulkan/runtime: Track VkSharingMode in vk_image
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27349>
2024-01-31 19:28:12 +00:00
Dylan Baker
4cd5b2b542 intel/hasvk: assume() we don't get ISL_NUM_FORMATS
Because coverity

CID: 1559412
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27369>
2024-01-31 18:59:16 +00:00
Dylan Baker
3d4ef6f983 intel/vulkan: assume() that we don't use "ISL_NUM_FORMATS"
Which coverity thinks will happen, even though we never return
ISL_NUM_FORMATS.

CID: 1559463
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27369>
2024-01-31 18:59:16 +00:00
Mike Blumenkrantz
529e7ab975 lavapipe: RM2024 extension promotions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27296>
2024-01-31 18:17:55 +00:00
Friedrich Vock
1c01fd0286 util/disk_cache: Use secure_getenv to determine cache directories
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
e8b0e5cac9 radv: Use secure_getenv for RADV_THREAD_TRACE_TRIGGER
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00
Friedrich Vock
c01a07f2e4 radv: Use secure_getenv in radv_builtin_cache_path
Reviewed-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:12 +00:00