Commit Graph

184021 Commits

Author SHA1 Message Date
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
Eric Engestrom
501f78fdba util: check for setgid() as well in __normal_user()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27378>
2024-01-31 11:42:56 +00:00
Eric Engestrom
afd4e633ee util: simplify logic in __normal_user()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27378>
2024-01-31 11:42:55 +00:00
Iago Toral Quiroga
6c570f7a98 v3dv: allow subgroup operations in fragment shaders
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
e5bfce6f46 broadcom/compiler: support subgroup reduction operations from fragment shaders
In fragment shaders these instructions consider a lane active when
any lane in the same quad is active, which is not what we want, so
we need to include the current sample mask in the condition mask
used with these instructions to limit lane selection to those that
are really active.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
3544113ee2 brodcom/compiler: implement non-compute TSY barrier
The BARRIER_ID instruction is only available in compute
and tessellation, implement an equivalent barrier that we
can use from other stages.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
5b269814fc broadcom/compiler: be more careful with unifa in non-uniform control flow
If the lane from which the hardware writes the unifa address
is disabled, then we may end up with a bogus address and invalid
memory accesses from follow-up ldunifa.

Instead of always disabling unifa loads in non-uniform control
flow we can try to see if the address is prouced from a nir
register (which is the only case where we do conditional writes
under non-uniform control flow in ntq_store_def), and only
disable it in that case.

When enabling subgroups for graphics pipelines, this fixes a
GMP violation in the simulator with the following test
(which has non-uniform control flow writing unifa with lane 0
disabled, which is the lane from which the unifa takes the
address):
dEQP-VK.subgroups.ballot_broadcast.graphics.subgroupbroadcastfirst_int

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
31e8740808 v3dv: expose more subgroup features on V3D 7.x
The hardware included additional instructions to support more
subgroup features, so let's put them to use.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
93df9800e8 broadcom/compiler: support subgroup quad
These can all be implemented as specialized shuffles, so we
use the NIR lowering to do that.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
69d3b90839 broadcom/compiler: support subgroup vote
We don't rely in any lowerings for these (other than
scalarization). The only noteworthy aspect is that these
instructions, like ballot, use the condition mask to
filter out valid invocations that are inactive because of
control flow.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
3222fd71a1 broadcom/compiler: support subgroup shuffle
This maps to our native shuffle instruction. For shuffle relative
and shuffle xor, we rely on the nir lowering to lower this to
ALU and regular shuffle.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
29a5e3e615 broadcom/compiler: support subgroup ballot
This adds support in our compiler for the subgroup ballot
feature. To this end we start using the NIR lowering for
subgroups which can lowers some of these intrinsics into
things more amenable to our hardware and takes care of
scalarization.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
295f906517 broadcom/compiler: don't move subgroup reduction instructions above setmsf
These use the sample mask to decide about active lanes, so we need
to make sure we don't move them above a previous setmsf instruction.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
9bbfbc2089 broadcom/compiler: add new SFU instructions in V3D 7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
7bdc8898b1 broadcom/compiler: fix incorrect flags update for subgroup elect
c->execute is 0 (not the block index) for lanes currently active
under non-uniform control flow.

Also this simplifies a bit the instructions we emit for flag
generation, both for uniform and non-uniform control flow.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Iago Toral Quiroga
29d4924e5e broadcom/compiler: fix incorrect flags setup in non-uniform if path
If the ELSE block is cheap then we don't emit the branch instruction
but we still want to generate the flags, since these are setting
the flags for the THEN block too.

Fixes: e401add741 ("broadcom/compiler: skip jumps in non-uniform if/then when block cost is small")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27211>
2024-01-31 10:06:06 +00:00
Konstantin Seurer
13ca3d0eeb radv/sqtt: Set SeparateCompiled for monolithic RT pipelines
RGP can not handle how we implement "Unified" ray tracing pipelines and
only shows the prolog.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:24 +01:00
Konstantin Seurer
6d2926c54e radv: Skip unused acceleration structure build paths
If the whole batch doesn't use a path, we can skip binding the pipeline
and writing an user event.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:20 +01:00
Konstantin Seurer
93b1eec09b radv: Emit user events during acceleration structure builds
This way, we can see exactly which dispatches belong to acceleration
structure builds and which dispatches were caused by the app. We loose
the red coloring in RGP for this, but we get way more information.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:15 +01:00
Konstantin Seurer
22b719b445 radv: Make radv_write_user_event_marker non-static
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:11 +01:00
Konstantin Seurer
f43099ecf5 radv: Reduce the amount of radv_device_to_handle calls
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:24:06 +01:00
Konstantin Seurer
41e78330e7 radv/radix_sort: clang-format
The formatting was changed and those files were missed.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26697>
2024-01-31 10:23:51 +01:00
Hyunjun Ko
d0d2cf549b anv/video: fix out-of-bounds read
Since STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE is 19.

Fixes: 8d519eb5 ("anv: add initial video decode support for h265")
Closes: mesa/mesa#10529

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27373>
2024-01-31 08:24:22 +00:00
Samuel Pitoiset
31e29f7304 radv: enable deviceFaultVendorBinary if RADV_DEBUG=hang is set
Ideally, if deviceFaultVendorBinary is enabled by the app,
RADV_DEBUG=hang should be enabled behind the scene, but this isn't
possible right now because CTS always enables the feature.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:45:08 +01:00
Samuel Pitoiset
a778d5fd0d radv: export GPU hang reports through VK_EXT_device_fault
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:45:08 +01:00
Samuel Pitoiset
8c3d1c9140 radv: add support for keeping GPU hang reports in memory
To be exported through VK_EXT_device_fault when the feature is enabled
by app, otherwise it's saved on disk.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:45:08 +01:00
Samuel Pitoiset
c710cba0c7 radv: refactor dumping GPU hang reports by using chunks
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:41:54 +01:00
Samuel Pitoiset
7a20946579 radv: add a helper to know if device fault detection is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
2024-01-31 08:41:54 +01:00