Commit graph

182729 commits

Author SHA1 Message Date
Dave Airlie
b3cfec2fd8 gallivm: handle llvm 16 atexit ordering problems.
This is ported from amd ac_llvm_helper.cpp, thanks to Marek for the pointer.

This is needed to avoid crashes due to atexit ordering between some piglit
tests and mesa internals.

Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26883>
2024-01-03 22:57:17 +00:00
Rob Clark
2c078bfd18 freedreno/drm/virtio: Fix typo
Fixes: b90244776a ("virtio/drm: Split out common virtgpu drm structs")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26884>
2024-01-03 22:28:41 +00:00
Yonggang Luo
19fca131b1 amd: Use align64 instead of ALIGN for 64 bit value parameter
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26869>
2024-01-03 22:02:17 +00:00
Mike Blumenkrantz
49378bc3cd zink: enforce maxTexelBufferElements for texel buffer sizing
according to spec, creating larger texel buffers is legal for apps
but the resulting texel buffer must be clamped to device limits

fixes #10068

backport-to: 23.3

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26873>
2024-01-03 21:39:59 +00:00
Daniel Schürmann
bf43af984a nir/opt_loop_cf: generalize removal of "trivial" continues
So that is also handles break statements and works in
arbitrarily nested control flow.

Totals from 905 (1.18% of 76636) affected shaders: (RADV, GFX11)
Instrs: 605164 -> 605548 (+0.06%); split: -0.01%, +0.08%
CodeSize: 3162036 -> 3163472 (+0.05%); split: -0.01%, +0.06%
Latency: 2045559 -> 1387622 (-32.16%)
InvThroughput: 352344 -> 231676 (-34.25%)
SClause: 16092 -> 16088 (-0.02%); split: -0.04%, +0.02%
Copies: 41286 -> 41297 (+0.03%); split: -0.02%, +0.05%
Branches: 19949 -> 19929 (-0.10%)
PreSGPRs: 33413 -> 33385 (-0.08%)
PreVGPRs: 19177 -> 19135 (-0.22%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940>
2024-01-03 20:48:05 +00:00
Daniel Schürmann
bdbf873b0f nir: remove redundant passes from nir_opt_if()
These are now covered by nir_opt_loop():
- opt_if_loop_last_continue()
- opt_merge_breaks()
- opt_if_loop_terminator()

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940>
2024-01-03 20:48:05 +00:00
Daniel Schürmann
5b1b5cd794 nir: remove nir_opt_trivial_continues()
This pass is superseded by nir_opt_loop()

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940>
2024-01-03 20:48:04 +00:00
Daniel Schürmann
a3ed36da1a treewide: replace calls to nir_opt_trivial_continues() with nir_opt_loop()
Totals from 850 (1.11% of 76636) affected shaders: (RADV, GFX11)
MaxWaves: 18134 -> 18130 (-0.02%)
Instrs: 3011298 -> 3008585 (-0.09%); split: -0.17%, +0.08%
CodeSize: 15836804 -> 15841972 (+0.03%); split: -0.09%, +0.12%
VGPRs: 63580 -> 63604 (+0.04%)
SpillSGPRs: 966 -> 1148 (+18.84%); split: -0.83%, +19.67%
Latency: 36102291 -> 30186144 (-16.39%); split: -16.41%, +0.02%
InvThroughput: 9058100 -> 7011821 (-22.59%); split: -22.61%, +0.02%
VClause: 65369 -> 65364 (-0.01%); split: -0.03%, +0.02%
SClause: 100309 -> 100305 (-0.00%); split: -0.04%, +0.04%
Copies: 335658 -> 336472 (+0.24%); split: -0.70%, +0.94%
Branches: 110806 -> 108945 (-1.68%); split: -1.94%, +0.26%
PreSGPRs: 73476 -> 73934 (+0.62%); split: -0.25%, +0.87%
PreVGPRs: 58809 -> 58840 (+0.05%); split: -0.01%, +0.06%

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940>
2024-01-03 20:48:04 +00:00
Daniel Schürmann
9808ef0349 nir/opt_loop: move loop control-flow optimizations into separate pass
This new pass aims to simplify loop control-flow by reducing the number
of break and continue statements. It also supersedes nir_opt_trivial_continues().

For this purpose, it implements 3 optimizations:
- opt_loop_terminator(), as previously
- opt_loop_merge_break_continue(), similar to opt_merge_breaks() incl. continues
- opt_loop_last_block(), a generalization of opt_if_loop_last_continue()

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24940>
2024-01-03 20:48:04 +00:00
Christian Gmeiner
0158075b22 nir/opt_peephole_select: handle speculative ubo loads
Some platforms may be able to speculate ubo loads safely.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8299>
2024-01-03 20:02:25 +00:00
Ruijing Dong
6c758000fb frontends/va: remove some TODOs in hevc encoding
Remove some TODOs in va hevc encoding sps parsing.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26770>
2024-01-03 19:23:08 +00:00
Karol Herbst
3ee6339206 clc: remove code supporting pre llvm-10
we require llvm-10+ already anyway, see meson.build:1726

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26871>
2024-01-03 18:30:32 +00:00
Danylo Piliaiev
99c69e624b freedreno: Disable UBWC for D/S images on A690
Mirrors workaround done for Turnip.

A690 seem to have broken UBWC for depth/stencil, it requires
depth flushing where we cannot realistically place it, like between
ordinary draw calls writing read/depth. WSL blob seem to use ubwc
sometimes for depth/stencil.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26226>
2024-01-03 17:35:07 +00:00
Danylo Piliaiev
fbfc1dc09d turnip: Disable UBWC for D/S images on A690
A690 seem to have broken UBWC for depth/stencil, it requires
depth flushing where we cannot realistically place it, like between
ordinary draw calls writing read/depth. WSL blob seem to use ubwc
sometimes for depth/stencil.

Some tests that this fixes:
 dEQP-VK.pipeline.monolithic.stencil.format.d24_unorm_s8_uint.states.fail_repl.pass_decw.dfail_inv.comp_never
 dEQP-VK.api.image_clearing.core.partial_clear_depth_stencil_attachment.single_layer.d32_sfloat_s8_uint_separate_layouts_depth_64x11
 dEQP-VK.api.image_clearing.dedicated_allocation.partial_clear_depth_stencil_attachment.single_layer.d16_unorm_33x128
 dEQP-VK.glsl.builtin_var.fragdepth.point_list_d32_sfloat_s8_uint_no_depth_clamp

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26226>
2024-01-03 17:35:07 +00:00
Danylo Piliaiev
9fcddb761b freedreno/devices: Update a690 magic regs from WSL blob
They don't seem to fix anything, but now that's values from driver
running on actual HW.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26226>
2024-01-03 17:35:07 +00:00
Sil Vilerino
e11605321a Revert "d3d12: Fix screen->winsys leak in d3d12_screen"
This reverts commit 81c8e89ff8.

Fixes: 81c8e89ff8 ("d3d12: Fix screen->winsys leak in d3d12_screen")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26872>
2024-01-03 17:17:30 +00:00
Sil Vilerino
97cc7ea5a5 Revert "d3d12: Only destroy the winsys during screen destruction, not reset"
This reverts commit 325fb6e26b.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10371
Fixes: 325fb6e26b ("d3d12: Only destroy the winsys during screen destruction, not reset")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26872>
2024-01-03 17:17:30 +00:00
daoxianggong
d6f0f46ae4 zink - Fix for blend color change without blend state change
Flag blend color change and make sure vkCmdSetBlendConstants is called.

Signed-off-by: daoxianggong <daoxiang.gong@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26799>
2024-01-03 16:35:51 +00:00
Gert Wollny
53efd35acc zink: Don't pass a blend state when we have full ds3 support
The blend state is considered to be dynamic when no
VkPipelineColorBlendStateCreateInfo  is passed in at pipeline creation.

Fixes:
 VUID-VkGraphicsPipelineCreateInfo-renderPass-06055 when running
  "Quern - Undying thoughts" when the GFX level enables blending.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26718>
2024-01-03 15:34:50 +00:00
Samuel Pitoiset
7ea48145a1 radv: stop clearing CMASK to 0xcc when FMASK is present on GFX9
This is incorrect because clearing CMASK to 0xCC should only happen
for fast clears with DCC and FMASK/CMASK.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26634>
2024-01-03 13:58:06 +00:00
Samuel Pitoiset
1714f7aff4 radv: disable FMASK for MSAA images with layers on GFX9
It seems that FMASK can be interleaved and RADV doesn't support this
properly, so let's disable it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26634>
2024-01-03 13:58:06 +00:00
Rhys Perry
cad2c0915d aco/tests: use more raw strings
Python 3.12 started giving a SyntaxWarning for unrecognized escapes such
as "\w". This might become a SyntaxError in a future python version.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26850>
2024-01-03 13:33:52 +00:00
Yonggang Luo
472b6f5379 intel,crocus,iris: Use align64 instead of ALIGN for 64 bit value parameter
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26864>
2024-01-03 12:46:10 +00:00
Yonggang Luo
5a2aa3ff88 intel: Cleanup duplicate ALIGN macro defines
Use ALIGN function instead

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26864>
2024-01-03 12:46:10 +00:00
Yonggang Luo
8665ce27bc intel: Use ALIGN_POT instead of ALIGN inside macro define
These macro define is compute from literals, so use ALIGN_POT instead of ALIGN function
so that it's can be computed at compile time

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26864>
2024-01-03 12:46:10 +00:00
Yonggang Luo
3a9c569177 intel: Avoid use align as variable, replace it with other names
align is a function and when we want use it, the align variable will shadow it
So replace it with other names

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26864>
2024-01-03 12:46:10 +00:00
Samuel Pitoiset
10ce61e16c radv: advertise VK_KHR_maintenance6
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757>
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
db9816fd66 radv: add support for NULL index buffer
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757>
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
744cb98bc6 radv: add support for version 2 of all descriptor binding commands
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757>
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
5f63624701 radv: rename RADV_GRAPHICS_STAGES to RADV_GRAPHICS_STAGE_BITS
For consistency with RADV_RT_STAGE_BITS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757>
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
17081334ab radv: add support for VkBindMemoryStatusKHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757>
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
845a666e0f radv: move radv_BindImageMemory2() to radv_image.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26757>
2024-01-03 11:24:27 +00:00
Samuel Pitoiset
f30fa9dec8 radv: move radv_rt_{common,shader} files to nir/
These files contains NIR lowering code for RT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851>
2024-01-03 09:40:29 +00:00
Samuel Pitoiset
02c5365ffa radv: make a couple of NIR RT functions as static
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851>
2024-01-03 09:40:29 +00:00
Samuel Pitoiset
685c4b6337 radv: move radv_{emulate,enable}_rt() to radv_physical_device.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26851>
2024-01-03 09:40:29 +00:00
Eric Engestrom
c100905796 docs: mention that python package packaging is required on python 3.12+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26857>
2024-01-03 09:28:14 +00:00
Luc Ma
b6d22358e4 loader: Remove a line of unused include
Signed-off-by: Luc Ma <luc@sietium.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26852>
2024-01-03 08:06:01 +00:00
Yiwei Zhang
68a9b3cc6f venus: properly ignore formats in VkPipelineRenderingCreateInfo
also remove a redundant trace point and adjust the position for another
to better tell whether fixes have been applied to the pipeline info

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26751>
2024-01-03 07:16:24 +00:00
Yiwei Zhang
a443d4dbc6 venus: refactor to add pipeline info fixes helpers
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26751>
2024-01-03 07:16:24 +00:00
Yiwei Zhang
c1d8056bbe venus: split up the pipeline fix description into self and pnext
prepare for fixing the pipeline pnext chain

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26751>
2024-01-03 07:16:23 +00:00
Yiwei Zhang
2e1c9b68df venus: clang format fixes
work around vk_outarray_append_typed till a better solution fits

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26751>
2024-01-03 07:16:23 +00:00
Yonggang Luo
18abdb8596 compiler/glsl: Move glsl specific _mesa_glsl_initialize_types out and glsl_symbol_table of glsl_types.h
To make sure C-ABI compat,

struct _mesa_glsl_parse_state;
struct gl_shader_program;
struct gl_builtin_uniform_desc;

are wrapped with extern "C"

And getting _mesa_glsl_initialize_variables c-compat for consistence

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26804>
2024-01-03 06:38:19 +00:00
Mark Janes
188c349e51 intel: remove workaround for preproduction DG2 steppings
DG2_G10 was released with stepping C0.
DG2_G11 was released with stepping B1.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26845>
2024-01-02 16:06:37 -08:00
Iván Briano
56d556f821 anv: enable VK_KHR_maintenance6
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26842>
2024-01-02 22:12:02 +00:00
Iván Briano
b7c4fe54cb anv: move astc_emu to use descriptors2 calls
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26842>
2024-01-02 22:12:02 +00:00
Iván Briano
ce6899d804 anv: add support for Cmd*DescriptorSet*2KHR
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26842>
2024-01-02 22:12:02 +00:00
Iván Briano
40377eed91 anv: handle VkBindMemoryStatusKHR on buffer/image memory bind
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26842>
2024-01-02 22:12:02 +00:00
Iván Briano
abe0cc8aa4 anv: remove no longer valid assert
Maintenance6 allows creating uncompressed views of compressed images
with multiple layers.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26842>
2024-01-02 22:12:02 +00:00
Iván Briano
3b5615500a anv: allow NULL index buffers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26842>
2024-01-02 22:12:01 +00:00
David Heidelberg
9017852de4 ci/radeonsi: disable VA-API testing on raven
Fails and freezes after Collabora farm outage.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26820>
2024-01-02 21:33:51 +00:00