Commit Graph

183660 Commits

Author SHA1 Message Date
Konstantin Seurer
024f144165 lavapipe: Report the correct preprocess buffer size
There can be multiple sequences.

Fixes: 976dd26 ("lavapipe: NV_device_generated_commands")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
cc94ff081c lavapipe: Mark vertex elements dirty if the stride changed
Fixes: 7672545 ("gallium: move vertex stride to CSO")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
6d98142eda gallivm: Use saturating fpto*i conversions
Matches what vkd3d-proton expects and how other hardware (AMD) behaves.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
6d88c1bb6c lavapipe: Fix DGC vertex buffer handling
Fixes: 976dd26 ("lavapipe: NV_device_generated_commands")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
e83ef27ba6 radv: Vectorize load_global_constant
Totals from 325 (0.38% of 84845) affected shaders:
Instrs: 2883767 -> 2880939 (-0.10%); split: -0.10%, +0.00%
CodeSize: 15388396 -> 15364976 (-0.15%); split: -0.16%, +0.00%
Latency: 20212583 -> 20197719 (-0.07%); split: -0.20%, +0.13%
InvThroughput: 5489738 -> 5489551 (-0.00%); split: -0.14%, +0.14%
VClause: 104225 -> 103944 (-0.27%); split: -0.30%, +0.03%
SClause: 71616 -> 71612 (-0.01%); split: -0.01%, +0.01%
Copies: 252143 -> 252284 (+0.06%); split: -0.10%, +0.15%
Branches: 117826 -> 117821 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 23502 -> 23506 (+0.02%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27084>
2024-01-18 21:30:39 +00:00
Konstantin Seurer
220c912080 ac/llvm: Enable helper invocations for quad OPs
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9239
cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27110>
2024-01-18 21:00:06 +00:00
Faith Ekstrand
5b1afb0482 nvk: Advertise VK_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
a55b2996ab nak: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
82fe981e35 nir,spirv: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Tapani Pälli
02d7f5e4ff anv: expand pre-hiz data cache flush to gfx >= 125
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-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/27132>
2024-01-18 19:45:04 +00:00
Tapani Pälli
93706d5c2f iris: expand pre-hiz data cache flush to gfx >= 125
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-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/27132>
2024-01-18 19:45:04 +00:00
Ian Romanick
7481d61a5d intel/compiler: Track mue_compaction and mue_header_packing flags in brw_get_compiler_config_value
v2: Use u_foreach_bit64. Suggested by Lionel.

Fixes: 48885c7fe3 ("intel/compiler: load debug mesh compaction options once")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
6f237a23c7 intel/compiler: Track lower_dpas flag in brw_get_compiler_config_value
This user-settable flag affects compiler output, so it should be tracked
in the cache hash.

Fixes: 3756f60558 ("intel/fs: DPAS lowering")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
2741c6464c intel/compiler: Use u_foreach_bit64 in brw_get_compiler_config_value
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
951e08fc18 intel/compiler: Disable DPAS instructions on MTL
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3756f60558 ("intel/fs: DPAS lowering")
Closes: #10376
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Gurchetan Singh
a1e67b3933 mesa/vulkan: use DETECT_OS_ANDROID
This uses DETECT_OS_ANDROID instead of defined(ANDROID).
This better supports glibc based host builds in the Soong
build system.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
c27cd96f31 mesa/vulkan: use a simpler path for header in trampoline gen
This works better if vk_dispatch_table.h is inside some "genDir",
and not generated "src/vulkan/util" directory.  This is the
case for the AOSP Soong build system.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
c860935501 mesa/util: use DETECT_OS_ANDROID in anon_file.c
glibc based Android build define ANDROID, but don't have
memfd headers.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
1b133ad446 mesa/util: add <linux/fcntl.h>
F_ADD_SEALS + F_SEAL_* are defined in <linux/fcntl.h> on Android.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
e08add9164 mesa/util: Check __ANDROID__ when for detecting for Android
"__ANDROID__ is defined by the compiler. It is defined for
all Android targets."

"ANDROID is set by some build systems, and not in any reliable
 manner (in AOSP it actually just means that you're in AOSP; it's
 set even when you're building host code for Windows, so it
 doesn't mean much of anything)."

https://github.com/android/ndk/issues/407
https://github.com/android/ndk/issues/807

Since the toolchain provides __ANDROID__ for actual Android
targets, standalone NDK and Soong builds should work.

The Mesa CI uses a combination of the NDK toolchain, internal
Android stubs and a Debian sysroot when compile testing Android.

Long-term, it should be possible to remove ANDROID and use
DETECT_OS_ANDROID everywhere.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Eric Engestrom
155b2b9555 CODEOWNERS: remove myself as a person of contact for a few things
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27151>
2024-01-18 18:42:23 +00:00
Eric Engestrom
52f24121b6 CODEOWNERS: add myself as as person of contact for CI changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27151>
2024-01-18 18:42:23 +00:00
Hans-Kristian Arntzen
efc0131d5b wsi/x11: Add workaround for Detroit Become Human.
Game needs strict image count to not crash in non-vsync mode.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27038>
2024-01-18 18:02:51 +00:00
Hans-Kristian Arntzen
4ab6d7e753 wsi/x11: Add drirc option to ignore SUBOPTIMAL.
Talos Principle and related games on that engine fail to handle
SUBOPTIMAL properly. Adds an option to ignore SUBOPTIMAL and pretend
it's SUCCESS.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27037>
2024-01-18 17:23:32 +00:00
Hans-Kristian Arntzen
745282736e wsi/x11: Compare modifiers before signalling SUBOPTIMAL.
When receiving SUBOPTIMAL_COPY, we need to consider that it can be a
false positive. Xwayland may send this suboptimal copy if there are
pending DRM modifier feedbacks from compositor, but it's likely the
modifier lists are identical.

Hash the modifier lists and compare them against the newly queried
modifier list when SUBOPTIMAL_COPY is received to work around false
positives.

This fixes crashes in games that cannot handle SUBOPTIMAL correctly,
and avoid needless stutters when entering full-screen modes.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27035>
2024-01-18 16:47:10 +00:00
Hans-Kristian Arntzen
2b9c54d47d wsi/x11: Remove unused vk_alpha in get_dri3_modifiers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27035>
2024-01-18 16:47:10 +00:00
Eric Engestrom
b25564ba33 zink+radv/ci: drop duplicates flakes lines
These are already sorted, so the duplicate is trivial to see as it's on
the next line every time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27147>
2024-01-18 16:30:04 +00:00
Javier Martinez Canillas
f7e407213b clc: silence a warn_unused_result
Ignoring asprintf() return value leads to the following compiler warning:

src/compiler/clc/liblibmesaclc.a.p/clc.c.o -MF src/compiler/clc/liblibmesaclc.a.p/clc.c.o.d -o src/compiler/clc/liblibmesaclc.a.p/clc.c.o -c ../src/compiler/clc/clc.c
In file included from ../src/compiler/clc/clc.c:28:
../src/compiler/clc/clc.c: In function ‘clc_libclc_new’:
../src/compiler/clc/clc_helpers.h:99:7: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   99 |       asprintf(&_msg, fmt, ##__VA_ARGS__);           \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/compiler/clc/clc_helpers.h:105:37: note: in expansion of macro ‘clc_log’
  105 | #define clc_error(logger, fmt, ...) clc_log(logger, error, fmt, ##__VA_ARGS__)

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27140>
2024-01-18 15:20:46 +00:00
Karol Herbst
338636a4ab clc: require LLVM-15
Allows us to drop code dealing with `opencl-c.h`.

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/27141>
2024-01-18 14:39:03 +00:00
Karol Herbst
bd085c253c clc: merge blocks handling optional features
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/27141>
2024-01-18 14:39:03 +00:00
Karol Herbst
faea27e4ac clc: require LLVM-14
This allows some code reorganization :)

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/27141>
2024-01-18 14:39:03 +00:00
Jordan Justen
05b628b5af intel/dev/common: Add xe2 support to get_l3_list()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26742>
2024-01-18 14:16:18 +00:00
José Roberto de Souza
df0fe0dfbd intel/genxml/xe2: Remove L3ALLOC
This register don't exist in Xe2 and there is no Bspec page with
another register to be programmed with L3 allocation layout so
intel_get_l3_config() can also always return NULL for Xe2.

Still allowing intel_get_l3_config() to return non-null because
intel_l3_config is used to calculate TBIMR parameters, see
intel_calculate_tile_dimensions().

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/26742>
2024-01-18 14:16:17 +00:00
Karol Herbst
36012af17f nir/printf: remove treat_doubles_as_floats
It is broken and clang uses fp32 for float constants if the fp64 extension
isn't enabled anyway. SPIRVs can't use fp64 constants with printf unless
they enable the Float64 cap, which also requires cl_khr_fp64 to be
supported.

So just remove it and rely on clang handling -cl-single-precision-constant
correctly, which at the moment doesn't seem to be the case, but we can
think about that once we plan to support cl_khr_fp64.

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/26541>
2024-01-18 13:16:13 +01:00
Danylo Piliaiev
d2b08f9437 freedreno/replay: Make meta "print" instruction take any number of regs
Useful when it is needed to print several regs together, for them not
to be randomly shuffled.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27121>
2024-01-18 10:24:55 +00:00
Benjamin Lee
30e09d0e98 nak: implement FLO on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27129>
2024-01-18 05:02:27 +00:00
Dave Airlie
f33683e4da radv: don't submit empty command buffers on encoder ring.
the vcn enc/unified rings don't do nop packets, and hang with 0 sized
cmd buffers. This just stops submitting 0 sized cmd buffers to the hw.

Fixes hangs with dEQP-VK.video.decode.h264_i on navi3x

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25932>
2024-01-18 13:33:25 +10:00
Dave Airlie
d32f2ee7b6 radv/video: refactor sq start/end code to avoid decode hangs.
The extra cmd buffer layer was done wrong, need to emit the
sq start and ends around every reset/decode packet.

Fixes dEQP-VK.video.decode.h264_i on navi3x

Fixes: d8f3060bd9 ("radv/video: start adding gfx11 vcn decoder")
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25932>
2024-01-18 13:33:10 +10:00
Dave Airlie
6bd31b60e1 vulkan/video: constify the encoding apis.
There is no need for these to be modified in here.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27082>
2024-01-18 11:32:26 +10:00
Yiwei Zhang
7f9381782f venus: ensure object id is unique
Currently driver side heap alloc obj ptr is used as object id, which is
used on the renderer side for actual vk obj mapping. However, this adds
an implicit dependency between any driver obj destroy/free and new obj
create/allocate because the heap obj freed up can be immediately
reallocated out.

With venus moving to multi-ring, the ordering between asynchronous obj
destroy/free and new obj create/allocate has to be guaranteed via driver
side non-primary ring submission always waiting for primary ring idle.
This can defeat the purpose of multi-ring in certain scenarios. So this
change adds a way to assign unique id to object.

Even before multi-ring, the unique object id can make device and queue
object alloc/free more robust without hidden ordering requirements. This
also fixes some oom cts which can intentionally fail the submission of
an object destroy (renderer side obj is still present) while the driver
side freed object ptr being reused for another object creating, causing
object id reuse at renderer side object table.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27083>
2024-01-18 01:13:59 +00:00
Faith Ekstrand
184bcfdc1c nvk: Implement VK_KHR_zero_initialize_workgroup_memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9609
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
6e214f2157 nvk: Properly configure the min/max shared mem size
We don't really understand what these values are supposed to be but this
is a lot closer to what the blob does and lets more compute tests pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
eaa7980e15 nvk: Add a #define for max shared memory size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
be0f04f5bd nvk: Unref shaders on pipeline free
Fixes: d6a1e29ccd ("nvk: pipeline shader cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
4b0448d8f8 nvk: Set framebufferIntegerColorSampleCounts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Eric Engestrom
03f5fc45bb docs: update calendar for 24.0.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27128>
2024-01-17 22:29:24 +00:00
Ryan Neph
6e4bb8253e venus: fix shmem leak on vn_ring_destroy
Missed shmem unref when moving ring internals out of vn_instance.c.

Fixes: d1e29b7557 ("venus: move ring shmem into vn_ring")
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27125>
2024-01-17 21:44:15 +00:00
Mary Guillemard
531505f8c5 nouveau: mme: Add a dumper
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
cb6d954c67 nouveau: nvidia-headers: Add nv_push_dump tool
Add "nv_push_dump" allowing to dump a human readable version of a
pushbuf blob.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
d9cd3e4c55 nouveau: nvidia-headers: Add compute array parsing to class_parser.py
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00