Commit graph

184048 commits

Author SHA1 Message Date
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
Friedrich Vock
72f95a8364 mesa/main: Use secure_getenv for shader dumping
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
321e2cee53 vtn: Use secure_getenv for shader dumping
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
f3b892b74a aux/trace: Guard triggers behind __normal_user
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:11 +00:00
Friedrich Vock
7ea96ff75b vulkan: Use secure_getenv for trigger files
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:11 +00:00
Friedrich Vock
8b209a6200 util: Provide a secure_getenv fallback for platforms without it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:11 +00:00
Eric Engestrom
0fa4ea98ca ci: always skip dEQP-VK.info.device_extensions
Exclude this test which might fail when a new extension is implemented.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27389>
2024-01-31 16:48:16 +00:00
Gert Wollny
4824238dd9 zink: Fix return type and values of create_buffer and create_images
Fixes: f6383e03f9
    zink: use enums as return values in resource_object_create

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10532
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27387>
2024-01-31 14:56:55 +00:00
Daniel Schürmann
c309d20172 aco/insert_exec_mask: Fix unconditional demote at top-level control flow.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27362>
2024-01-31 13:50:46 +00:00
Dave Airlie
4097df29f6 nvk: allow 3d compressed textures
Fixes KHR-GL45.packed_pixels.varied_rectangle.compressed_*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990>
2024-01-31 13:32:32 +00:00
Faith Ekstrand
9ddf647eab nvk: Fix whitespace in nvk_image.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990>
2024-01-31 13:32:32 +00:00
Faith Ekstrand
e8bec58de0 nil: Set the level offset to 0 in nil_image_for_level
The offset_B member of levels[0] should always be 0.  In this case,
we're copying the level from the previous image but we've already taken
the offset into account via the offset_B_out parameter.  Leaving the
offset non-zero risks it getting added in twice if nil_image_for_level
gets called again.  In particular, NVK can hit this with 3D compressed
textures with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT set.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990>
2024-01-31 13:32:32 +00:00
Antoine Coutant
445aacb421 clc: retrieve libclang path at runtime.
LLVM_LIB_DIR is a variable used for runtime compilations.
When cross compiling, LLVM_LIB_DIR must be set to the
libclang path on the target. So, this path should not
be retrieved during compilation but at runtime.

dladdr uses an address to search for a loaded library.
If a library is found, it returns information about it.
The path to the libclang library can therefore be
retrieved using one of its functions. This is useful
because we don't know the name of the libclang library
(libclang.so.X or libclang-cpp.so.X)

v2 (Karol): use clang::CompilerInvocation::CreateFromArgs for dladdr
v3 (Karol): follow symlinks to fix errors on debian

Fixes: e22491c832 ("clc: fetch clang resource dir at runtime")
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by (v1): Jesse Natalie <jenatali@microsoft.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00
Karol Herbst
8efd11fce9 clc: force fPIC for every user when using shared LLVM
As we want to start using `dladdr`, this is needed to prevent `dladdr`
returning information of the wrong file.

Fixes tag as it's required by the actual fix.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Fixes: e22491c832 ("clc: fetch clang resource dir at runtime")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00
Karol Herbst
37a1346347 meson: remove opencl-external-clang-headers option and rely on shared-llvm
Setting opencl-external-clang-headers to enabled while using shared LLVM
was broken and this option was mostly used for windows to force static
inclusion of opencl base headers.

Simply relying on the shared-llvm option here is enough to get what we
want.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00