Lionel Landwerlin
dcb5cfbfcc
vulkan/runtime: add a multialloc vk_shader allocator
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792 >
2025-02-27 10:01:17 +02:00
Lionel Landwerlin
009ef67c8d
vulkan/runtime: pass robustness state to preprocess vfunc
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792 >
2025-02-27 10:01:16 +02:00
Lionel Landwerlin
4dba1ad93f
vulkan/runtime: ensure robustness state is fully initialized
...
This is part of the hashing key :
==25753== Uninitialised byte(s) found during client check request
==25753== at 0x93D29AE: blob_write_bytes (blob.c:164)
==25753== by 0x93A62C6: vk_pipeline_precomp_shader_serialize (vk_pipeline.c:722)
==25753== by 0x93AC55E: vk_pipeline_cache_add_object (vk_pipeline_cache.c:433)
==25753== by 0x93A691B: vk_pipeline_precompile_shader (vk_pipeline.c:875)
==25753== by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753== by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)
==25753== Address 0xf1adf82 is 82 bytes inside a block of size 152 alloc'd
==25753== at 0x64FA858: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25753== by 0x99AAC38: vk_default_alloc (vk_alloc.c:26)
==25753== by 0x93A403B: vk_alloc (vk_alloc.h:48)
==25753== by 0x93A406B: vk_zalloc (vk_alloc.h:56)
==25753== by 0x93A60A0: vk_pipeline_precomp_shader_create (vk_pipeline.c:680)
==25753== by 0x93A689D: vk_pipeline_precompile_shader (vk_pipeline.c:866)
==25753== by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753== by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementations")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792 >
2025-02-27 10:01:02 +02:00
Tapani Pälli
78e5157a9c
intel/compiler: add a spec note about L1WT types being uncached
...
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/33755 >
2025-02-27 05:38:35 +00:00
Peyton Lee
7c8d58c26c
radeonsi/vpe: vpe support hdr input
...
when an application asks for supported formats
will return HDR formats(2020, explicit) is supported.
Signed-off-by: Peyton Lee <peytolee@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731 >
2025-02-27 03:15:17 +00:00
Peyton Lee
43ce5b1138
radeonsi/vpe: vpe support tonemapping
...
if input source is HDR stream, vpe can use gmlib generating tonemapping
table to convert HDR image to SDR image.
Signed-off-by: Peyton Lee <peytolee@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731 >
2025-02-27 03:15:17 +00:00
Peyton Lee
2e46c41448
amd/gmlib: add gmlib for radeonsi
...
radeonsi drivers can use gmlib to generate 3dlut used to do tonemapping.
Signed-off-by: Peyton Lee <peytolee@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731 >
2025-02-27 03:15:16 +00:00
Marek Olšák
2e124dd389
util: remove glthread enablement from app profiles
...
It's mature, so if you want it, just enable it for your driver by default.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33480 >
2025-02-27 02:28:58 +00:00
Faith Ekstrand
8fffcdb18b
nak/nir: Re-materialize load_const instructions in use blocks
...
This is useful both for correctness (to ensure that things we think are
constant stay constant) and it improves performance a bit by reducing
register pressure and avoiding spilling.
Pipeline-db stats:
CodeSize: 29665072 -> 29437344 (-0.77%); split: -0.92%, +0.16%
Number of GPRs: 157124 -> 156082 (-0.66%)
SLM Size: 148900 -> 146436 (-1.65%)
Static cycle count: 6840286 -> 6805711 (-0.51%); split: -0.98%, +0.47%
Spills to memory: 177779 -> 173337 (-2.50%)
Fills from memory: 177779 -> 173337 (-2.50%)
Spills to reg: 17692 -> 16731 (-5.43%)
Fills from reg: 12013 -> 11897 (-0.97%)
Max warps/SM: 309128 -> 309456 (+0.11%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
8de37b142e
nvk: Only support compute shader derivatives on Turing+
...
Fixes: e0e7d8d910 ("nvk: Advertise VK_NV/KHR_compute_shader_derivatives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
bd04fdcb2b
nvk: Only support deviceGeneratedCommandsMultiDrawIndirectCount on Turing+
...
Indirect draws on Maxwell involve patching pushbufs together and doing
that isn't possible with device generated commands.
Fixes: 83b220f833 ("nvk: Advertise VK_EXT_device_generated_commands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
7e12ba8709
nvk: Handle pre-Turing dispatch indirect commands
...
The QMD layout is a bit different.
Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
c540e5e2cc
nak/qmd: Add a nak_get_qmd_cbuf_desc_layout() helper
...
Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
755a6884d3
nak/qmd: Drop some unnecessary .try_into().unwrap()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
59f7f76166
nouveau/class_parser: Make strided element functions const
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Faith Ekstrand
0c4be9e0ff
nvk: Fix indentation in begin_end_query()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771 >
2025-02-27 00:26:54 +00:00
Mel Henning
2a0302967f
nak: Add spill/fill statistics
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773 >
2025-02-26 23:52:31 +00:00
Mel Henning
0480d8294c
nak/spill_values: Make Spill take &mut self
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773 >
2025-02-26 23:52:31 +00:00
Mel Henning
ae0576a7f8
nak: Add an occupancy statistic
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773 >
2025-02-26 23:52:31 +00:00
Mel Henning
890bab86b4
nak: Add static cycle count statistic
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773 >
2025-02-26 23:52:31 +00:00
Lionel Landwerlin
b72c772f83
spirv: fix racy build
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reported-by: Ki'sak
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33769 >
2025-02-26 23:09:51 +00:00
Dave Airlie
8a64eee4d7
nvk: enable float16 on turing.
...
Reviewed-by: Mel Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33521 >
2025-02-26 22:48:49 +00:00
Dave Airlie
b45feed3b2
nak: adjust latencies on fp16/64 instructions on Turing
...
These instructions on Turing require longer latencies,
this fixes the float16 tests on Turing.
Reviewed-by: Mel Henning <drawoc@darkrefraction.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33521 >
2025-02-26 22:48:49 +00:00
Paulo Zanoni
fd10764cff
brw: extend the NOP+WHILE workaround
...
It turns out that we need to add a NOP not only in between two
consecutive WHILE instructions, but also after every control flow
instruction that immediately precedes a WHILE.
v2: Rebase after the renames.
Fixes: 5ca883505e ("brw: add a NOP in between WHILE instructions on LNL")
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021 >
2025-02-26 22:23:16 +00:00
Paulo Zanoni
3596b4e325
brw: add instructions missing from is_control_flow()
...
I'm not aware of any workloads that will be impacted by this change,
but let's keep our list of control flow instructions complete. A
shader-db run on MTL tells me nothing changes.
v2: "The scheduler relies on HALT not being considered control flow to
be able to move code past HALT instructions. Doing this would prevent
such optimization from happening and would reduce performance
dramatically in some cases." - Francisco.
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021 >
2025-02-26 22:23:16 +00:00
Mike Blumenkrantz
0e87acb2f3
dri: delete INVALIDATE extension
...
this shouldn't be needed anymore since it doesn't do anything
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33774 >
2025-02-26 21:46:06 +00:00
Erik Faye-Lund
6ab4a0b5c9
panfrost: respect pipe_rasterizer_state::line_rectangular
...
The state-tracker already tells us if we should use rectangular ends or
not on our lines, so we don't need to manually infer this from
combination of states.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33382 >
2025-02-26 21:11:06 +00:00
Erik Faye-Lund
6bb4971497
pan/genxml: rename field
...
This field is really about the line-shape, not multisampling or not.
Yeah, in OpenGL, these two concepts are kinda intertwined. But this is
what the state actually does, so let's name it based on that.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33382 >
2025-02-26 21:11:06 +00:00
Karol Herbst
dad5ee1039
intel/brw, lp: enable lower_pack_64_4x16
...
The compiler won't be able to emit pack_64_4x16, so we should prevent
nir_opt_algebraic to optimize to it. This fixes an infinite optimization
loop inside brw_nir_optimize:
nir_copy_prop
16x4 %77 = @load_global (%80)
32 %61995 = pack_32_2x16_split %77.x, %77.y
32 %61998 = pack_32_2x16_split %77.z, %77.w
64 %61999 = pack_64_2x32_split %61995, %61998
64 %76 = iadd %100, %79
@store_global (%61999, %76)
nir_opt_algebraic
16x4 %77 = @load_global (%80)
32 %61995 = pack_32_2x16_split %77.x, %77.y
32 %61998 = pack_32_2x16_split %77.z, %77.w
16x4 %62000 = vec4 %77.x, %77.y, %77.z, %77.w
64 %62001 = pack_64_4x16 %62000
64 %76 = iadd %100, %79
@store_global (%62001, %76)
nir_lower_pack
16x4 %77 = @load_global (%80)
16x4 %62000 = vec4 %77.x, %77.y, %77.z, %77.w
16 %62002 = mov %62000.y
16 %62003 = mov %62000.x
32 %62004 = pack_32_2x16_split %62003, %62002
16 %62005 = mov %62000.w
16 %62006 = mov %62000.z
32 %62007 = pack_32_2x16_split %62006, %62005
64 %62008 = pack_64_2x32_split %62004, %62007
64 %76 = iadd %100, %79
@store_global (%62008, %76)
// brw_nir_optimize loops here
nir_copy_prop
16x4 %77 = @load_global (%80)
32 %62004 = pack_32_2x16_split %77.x, %77.y
32 %62007 = pack_32_2x16_split %77.z, %77.w
64 %62008 = pack_64_2x32_split %62004, %62007
64 %76 = iadd %100, %79
@store_global (%62008, %76)
llvmpipe has a similar issue inside lp_build_opt_nir
Fixes: b1bc691b0f ("nir/algebraic: add and improve pack/unpack patterns")
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33347 >
2025-02-26 20:43:39 +00:00
Mike Blumenkrantz
480d8bea2b
zink: put zink_program::reference on separate cacheline
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738 >
2025-02-26 20:19:50 +00:00
Mike Blumenkrantz
08dc6aa354
zink: use a separate ralloc ctx for zink_program objects
...
I considered removing ralloc at all here but it was more deeply embedded
than I realized. maybe a project for another time
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738 >
2025-02-26 20:19:50 +00:00
Ian Romanick
495812d8e0
brw/print: Don't let SHADER_OPCODE_FLOW affect indentation
...
In `fossilize-replay --pipeline-hash 375a63e14afa96c4
fossils/fossil-db/steam-dxvk/f1_22_abu_dhabi.dx12vk-ultra.foz`,
`cf_count` would get decremented below zero. This would lead trying to
print `UINT_MAX` levels of indentation just a few lines below. I ran
out of disk space and patience before that finished. 🤣
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33748 >
2025-02-26 19:50:30 +00:00
Yiwei Zhang
bef1c23a23
venus: re-enable 1.4 support
...
Have made core venus protocol update to be able to support host image
copy.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
577fa1793d
venus: enable VK_EXT_host_image_copy support
...
Fill the core features and properties properly, and conditionally pass
through support of the extension based on the renderer venus protocol
spec version.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
f3da8167d6
vulkan/util: clean up copy_property and fix for setter
...
For setters, e.g. vk_set_physical_device_properties_struct used by venus
to fill all props, the out array storage comes from the driver, so we'd
assign directly. This change also fixes the template indent and drops an
unused arg.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
c13da1c744
venus: implement host image copy commands
...
The img-2-img and layout transition are trivial passthrough. For
img-2-mem and mem-2-img copies, host pointer has to be sized for proper
protocol encoding and decoding, and we have to either query or calculate
on our own based on VK_HOST_IMAGE_COPY_MEMCPY_EXT flag being used or
not.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
036493f43d
venus: extend image format cache for host copy props
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
2eb5a75d51
venus: sync latest protocol v3 support for host copy
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
fde5cebec5
venus: fix image format cache miss with AHB usage query
...
should skip updating cache key instead of marking as a miss
Fixes: e48645250c ("venus: image format properties cache")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
15777727c9
venus: use sharing_mode from common vk_image
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
f9afd65695
venus: drop unnecessary struct
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Yiwei Zhang
bcb0b8c7f6
venus: suppress a few -Wmaybe-uninitialized
...
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757 >
2025-02-26 19:16:48 +00:00
Mike Blumenkrantz
f9fe08740a
zink: always fully unwrap contexts
...
threaded_context_unwrap_sync() can be called safely on non-threaded
contexts
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33742 >
2025-02-26 18:54:25 +00:00
Lionel Landwerlin
d0c980caa7
brw: avoid setting up the sampler header bits when unused
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704 >
2025-02-26 17:19:04 +00:00
Lionel Landwerlin
8b4f997168
brw: optimize load payload with immediate headers
...
Currently the condition to use a single MOV is failing on immediate
values, so we emit 2 MOVs in SIMD8 instead of a single SIMD16.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704 >
2025-02-26 17:19:04 +00:00
Rob Clark
513184fa44
tu: Suballoc VkEvent BOs
...
No need to burn an entire PAGE_SIZE BO for an event. And in particular
the pattern of allocate + immediate mmap is expensive in a VM.
Suballocating cuts down the # of times we do this in
dEQP-VK.api.command_buffers.execute_large_primary from 10000 to 157,
avoiding problems with the test running up against watchdog timeout.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33721 >
2025-02-26 16:51:08 +00:00
Alyssa Rosenzweig
c3cc756cf9
ir3: clean up progress manually
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722 >
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
266638d10a
nir: clean up progress
...
semantic patch made a few bad choices.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722 >
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
593308a685
nir: eliminate nir_metadata_preserve
...
Everybody uses the wrapper now.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722 >
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
24d088104f
nir,nak: update comments referencing nir_metadata_preserve
...
in prep for removing this method.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722 >
2025-02-26 15:19:53 +00:00