Commit graph

198342 commits

Author SHA1 Message Date
Samuel Pitoiset
851a8a481b vulkan: add MESA_VK_TRACE_PER_SUBMIT
To capture RGP per-submit for compute-only workloads. Other capture
tools like RMV are not covered here.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:20 +00:00
Job Noorman
86465a3f2b ir3: add pass to select bitwise triops
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
faba4ca5f8 ir3: add codegen for bitwise triops
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
5879e4470e ir3: fix backend support for bitwise triops
- Immediates are not allowed in 2nd src.
- Immediates are 12 bits, not sign-extended.
- Only one of the first two sources can be shared when not scalar ALU.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
1333af5d77 nir/search: add is_only_used_by_{iand,ior} helpers
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
a8c947df9a nir/search: make is_only_used_by_iadd reusable
The algorithm is exactly the same for other opcodes so we don't have to
have to copy paste it.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
22fc90a116 nir: add ir3-specific bitwise triop opcodes
ir3 has a number of bitwise triops (e.g., shrm == (src0 >> src1) & src2)
that don't have NIR-equivalents. Doing instruction selection for them is
a lot more convenient using algebraic patterns than to have to manually
match for them. This patch add NIR opcodes for these instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Eric Engestrom
c51378fa6c docs: add sha sum for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Eric Engestrom
955bdb82c3 docs: add release notes for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Eric Engestrom
4b0c600fa2 docs: update calendar for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Marek Olšák
1a7c54b840 Revert "gbm: mark surface buffers as explicit flushed"
This reverts commit c49a71c03c.

It broke radeonsi.

GBM can't set __DRI_IMAGE_USE_BACKBUFFER if gbm itself doesn't use it as
a back buffer by rendering to it and calling SwapBuffers. If another
library uses it as a back buffer, that library should set
__DRI_IMAGE_USE_BACKBUFFER, not GBM. A different flag could be added
to indicate the behavior that the original commit expected.

Fixes: c49a71c03c - gbm: mark surface buffers as explicit flushed
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11996
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32345>
2024-11-27 22:48:04 +00:00
Timothy Arceri
1f954a207b glsl: remove now unused ir reader
This was used to parse glsl ir in string format and create real ir with
it. It was previously used for some really old test infrastructure which
has now been removed so lets burn this with fire also.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
722f939614 glsl: drop last remaining lower jump test
This test only tests that a redundant continue is removed. This test is
not very useful and there are hundreds of lines of supporting test
infrastructure that can be removed if we drop it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
cf188a0efb glsl: remove return lowering from glsl ir
We don't need it as nir does it for us anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
6c86b56c06 glsl: disable function return lowering in glsl ir
We just let the nir lowering pass do it instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Eric Engestrom
a37d5dcd63 radv/ci: use deqp-vk-main in radv jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
596c58b582 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
beab815670 ci/deqp: add a deqp-vk build on the main branch
To be able to run new tests as soon as they are merged, instead of
having to wait for the next official CTS release

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
328a3de7cc ci/lava: turn the $BUILD_VK check into a proper if block
Allows us to simply add something in the block in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
ec27d138cb ci/deqp: only print the commit list header when the list is not empty
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
044cab6751 ci/deqp: mention the deqp api in the version string
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
ffb6c3e1de ci/deqp: simplify generating the version description file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
72a2b92e3e ci/deqp: support having commit backports and local patches for main too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
1634ad2782 ci/deqp: fix the "is this a build on main?" check
Suggested-by: Antonio Ospite
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
601088aebb ci/deqp: simplify paths since we are already in /deqp-$deqp_api/
Some commands used relative paths, while most used complex absolute
paths; let's just avoid unnecessary complexity.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Antonio Ospite
3bdb77e378 ci/deqp: replace local android patches with upstream solution
In commit a34982063 (Support standalone executable builds on Android,
2024-09-12) upstream VK-GL-CTS added support for building deqp as an
executable command for Android, this change is included in the vulkan
branch used by build-deqp.sh so the custom patches can be dropped for
the Vulkan CTS build.

After that and by passing -DDEQP_ANDROID_EXE=ON deqp can now be built
with DEQP_API=tools.

[Eric]
Note that the upstream solution seems to be broken on EGL, so GL & GLES
continue to use the local android patches; for more details, see:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168#note_2676128

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Alyssa Rosenzweig
c2973765e2 nir: add nir_lower_constant_to_temp helper
this comes up with clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
12cc22af4c nir: add nir_remove_entrypoints helper
opposite of nir_remove_non_entrypoint. this operation comes up with
precompiling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
c076900360 nir: add nir_function::pass_flags
convenience, asahi will stash stuff here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
7d6e923a4f vtn: gather workgroup size in libraries
we have multiple kernels. that's fine, gather sizes for each.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
9c37745f9d vtn: plumb through OpEntryPoint
mark nir_functions as entrypoints according to the source.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
5555769102 nir: add workgroup size to functions
for cl kernel libraries with many entrypoints. spirv can represent, nir should
be able to as well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
ba30eb9f40 nir: add nir_foreach_entrypoint macros
for compiling libraries full of kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
83581b3f1f asahi/clc: switch to nir_lower_calls_to_builtins
common code has a generic version, so we don't need to handroll this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:04 +00:00
Alyssa Rosenzweig
d8ece9bf3a nir: add nir_lower_calls_to_builtins pass
nir_builder for the GPU

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:04 +00:00
Pierre-Eric Pelloux-Prayer
879e8bfe6d radeonsi: use bytes units in streamout
GFX10.3 and earlier were configured to count the number of dwords written,
and VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE was also configured in dw units.

GFX11+ on the other hand used nir code that would use bytes.

This commit aligns radeonsi's logic on the radv's one, and use STRMOUT_DATA_TYPE
to configure older chips to use bytes as well.

This fixes GTF-GL46.gtf40.GL3Tests.transform_feedback2.transform_feedback2_two_buffers.

It also seems to have an effect on:
  - dEQP-GLES3.functional.transform_feedback.random.separate.*
  - dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.*
but the results seem flaky so need further investigation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
272addc672 ac/nir: remove prim_stride_ret arg from ngg_build_streamout_buffer_info
This is not used outside of this function, so declare it as a local
variable instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
9f4ab06842 glx: return BadMatch for invalid reset notification strategy
The specification doesn't say which error should be reported, but
piglit expects BadMatch:

   /* The GLX_ARB_create_context_robustness spec does not say what error
    * code should be generated.  However, similar cases (e.g., valid GL
    * versions) specify BadMatch.  This is also the behavior of NVIDIA's
    * closed-source driver.
    */

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
d3798130ad radeonsi: disable DCC for PIPE_BIND_USE_FRONT_RENDERING
Front rendering and (display) DCC are causing artifacts on screen.

si_texture_get_handle deals with this problem by disabling dcc, but
we can make it simpler by not allocating DCC at all when this flag
is set.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
666a6eb871 radeonsi/gfx12: disable display dcc for front buffer rendering
Same logic as other chips, except we need to reallocate the texture
as we can't disable dcc.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
df7bb6bfd2 dri: Remove unused function
This function is unused so get rid of it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Zan Dobersek
be9f2e5189 tu/a7xx: support 8x MSAA
a7xx hardware has 8x MSAA capabilities we can expose. The 8-bit sample
count flag is included in the supported sample counts when computing image
format properties for MSAA-capable image creation conditions, with the
exception of 128-bit formats that don't support 8x MSAA.

UBWC blocksize logic is updated to cover cases of 16-bit and 32-bit formats
that support 8x MSAA. The per-cpp blocksize array is adjusted to also cover
128-byte values for which UBWC has to be disabled anyway.

VK_EXT_sample_locations implementation is adjusted to support sampling in
up to 8 locations, achieved by writing into additional sample location
registers.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32180>
2024-11-27 17:26:02 +00:00
Lionel Landwerlin
292c6a5156 anv: avoid using cmd_buffer for flushing runtime
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
ce4f884fcc anv: avoid using cmd_buffer for TBIMR state computation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
6096586893 anv: rework Wa_18038825448 to track state on anv_gfx_dynamic_state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
337763f461 anv: reuse device local variable in hw state emission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
fc404c962c anv: try to avoid using cmd_buffer in gfx runtime flushing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
560ce4ba1d anv: move primitive_topology to anv_gfx_dynamic_state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Georg Lehmann
fd669fa69d aco/optimizer: label fcanonicalize like a copy if there is nothing to flush
Allows copy propagation into non alu instructions like phis.

Foz-DB Navi21:
Totals from 138 (0.17% of 79395) affected shaders:
Instrs: 308135 -> 307792 (-0.11%); split: -0.12%, +0.01%
CodeSize: 1567924 -> 1566484 (-0.09%); split: -0.10%, +0.01%
VGPRs: 9696 -> 9720 (+0.25%)
Latency: 1162719 -> 1161663 (-0.09%); split: -0.10%, +0.00%
InvThroughput: 256944 -> 256590 (-0.14%); split: -0.15%, +0.01%
VClause: 5631 -> 5626 (-0.09%); split: -0.14%, +0.05%
Copies: 29962 -> 30028 (+0.22%); split: -0.10%, +0.32%
Branches: 8241 -> 8237 (-0.05%)
PreVGPRs: 7800 -> 7797 (-0.04%)
VALU: 216243 -> 215898 (-0.16%); split: -0.17%, +0.01%
SALU: 30768 -> 30767 (-0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32355>
2024-11-27 15:14:31 +00:00
Konstantin
8197d744f5 radv: Do not overwrite VRS rates when doing fast clears
Fixes a whole bunch of VRS tests on navi24.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318>
2024-11-27 14:45:31 +00:00