Samuel Pitoiset
7f608fc206
radv: use canonicalized VA for VM fault reports
...
Otherwise, the returned VA from vkGetBufferDeviceAddress() or via
VK_EXT_device_address_binding_report doesn't match and applications
would have to mask out.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28652 >
2024-04-15 17:38:44 +00:00
Samuel Pitoiset
502f0091de
radv/rt: stop computing unused hash for the traversal shader
...
This isn't used at all.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28711 >
2024-04-15 08:49:21 +00:00
Samuel Pitoiset
9a5016d54d
radv/rt: use radv_pipeline_hash_shader_stage()
...
It should be equivalent.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28711 >
2024-04-15 08:49:21 +00:00
Samuel Pitoiset
4586451b2d
radv: add missing SQTT markers when an indirect indexed draw is used with DGC
...
Since DGC preprocessing for IBO is supported, the driver generates
an indexed indirect draw but SQTT markers were missing and this
introduced complete non-sense in RGP captures.
Fixes: e59a16bbb8 ("radv: use an indirect draw when IBO isn't updated as part of DGC")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28710 >
2024-04-15 07:22:49 +00:00
David Rosca
4a19047d32
radv/video: Select temporal layer when encoding each frame
...
This makes the rate control per temporal layer work.
Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734 >
2024-04-15 09:58:19 +10:00
David Rosca
3393e56373
radv/video: Set VBV buffer size and level
...
Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734 >
2024-04-15 09:58:17 +10:00
David Rosca
8875a79513
radv/video: Set correct bitstream buffer size
...
Fixes
dEQP-VK.video.encode.h264_i_p_not_matching_order
dEQP-VK.video.encode.h265_i_p_not_matching_order
Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734 >
2024-04-15 09:58:14 +10:00
David Rosca
5df45c0f99
radv/video: Fix setting slice QP
...
constantQp will be 0 according to spec for any rate control method
other than NONE, so it should only be used with NONE rate control and
not when default rate control (which is internally NONE) is used.
Also it shouldn't override min/max QP.
Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734 >
2024-04-15 09:57:49 +10:00
Marek Olšák
7de43c4fb8
ac: add helper ac_get_ip_type_string to remove duplication
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:04 -04:00
Marek Olšák
c91b56c271
ac/llvm: add support for 16-bit coordinates (A16) for image (non-sampler) opcodes
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28607 >
2024-04-12 22:22:03 -04:00
Samuel Pitoiset
c82b8a8153
radv: stop ignoring shader stages that don't need to be imported with GPL
...
The Vulkan specification has been updated since I wrote this and it's
invalid now.
This marks some tests as expected failures because they are invalid
now and they will be removed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28692 >
2024-04-12 06:24:43 +00:00
Georg Lehmann
5e6e3c7f89
nir: rename to nir_opt_16bit_tex_image
...
Not sure what I was thinking when I wrote this pass (probably not much),
but opt makes more sense and matches other nir passes.
Fold is usually used for constants, and this pass handles more than those.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28662 >
2024-04-11 06:10:33 +00:00
Dave Airlie
16682b6054
radv/video: don't advertise timestamp bits for decode/encode
...
At this point I'm not sure if the queues can support timestamps.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 13:40:04 +10:00
Dave Airlie
ee64a385b6
radv/video: handle encode control parameters better.
...
The spec clarifies different operations for the reset flags,
just clean it up to follow it better.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 13:40:04 +10:00
Dave Airlie
05cd42417f
radv/video: enable video encoding behind perftest flag
...
This probes the vcn firmware version to make sure it can support
the encode extensions properly, then uses the perf test flag if so.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 13:40:02 +10:00
Dave Airlie
967e4e09de
radv/video: add h265 encode support
...
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 13:40:02 +10:00
Dave Airlie
54d499818c
radv/video: add initial support for encoding with h264.
...
This adds the encoding infrastructure along with support for h264.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 13:28:32 +10:00
Dave Airlie
800c03ffbd
radv/video: add parameter patching calls.
...
This is just infrastucture for encoding to plug into to patch
session parameters at create time.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 12:57:13 +10:00
Dave Airlie
1d74661dfd
radv: add encoder queue support pieces and encoder queries.
...
This is just checks for events and avoiding an assert in the winsys,
and adds support for the encoder queries.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 12:57:05 +10:00
Dave Airlie
f6c27bea26
radv: add direct cs emit for a dword.
...
This lets you write a dword at a certain location, this is needed
for the encode queues.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 12:48:29 +10:00
Dave Airlie
1ce215c5a3
radv/video: export unified queue header/tail functions.
...
These will be used for encode as well.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25900 >
2024-04-11 12:48:26 +10:00
Timur Kristóf
cfb8f3c1a5
radv: Clean up gathering linked I/O info.
...
The code is more concise now without these helpers.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488 >
2024-04-11 00:44:45 +00:00
Timur Kristóf
0e481a4adc
radv: Always use fixed I/O locations for TCS outputs in VRAM.
...
The goal of this patch is to make the TCS->TES shader I/O
independent of assigned I/O driver locations.
Always using the unlinked approach means a larger stride when
calculating some memory addresses, but otherwise should have no
perf impact whatsoever, because this only affects how TCS
outputs are stored to VRAM, and doesn't affect how they are
stored in LDS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488 >
2024-04-11 00:44:45 +00:00
Timur Kristóf
892ebf2040
radv: Add radv_gather_unlinked_io_mask to shader info header.
...
We will call this from another file.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488 >
2024-04-11 00:44:45 +00:00
Timur Kristóf
e8ddf1a064
radv: Remove dead code for creating per-patch IO mask.
...
Not relevant or necessary anymore.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488 >
2024-04-11 00:44:45 +00:00
Timur Kristóf
66f4dd292c
radv: Keep track of TCS outputs that need LDS.
...
Instead of reserving LDS space for all TCS outputs, we will now
only reserve it for TCS outputs which really need it, ie. those
which are read by the TCS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28488 >
2024-04-11 00:44:45 +00:00
Samuel Pitoiset
9840607f4b
radv: rework and add a helper for hashing a compute pipeline
...
It should be similar to the previous hashing method but it allows us
to get a hash directly from a pCreateInfo for future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651 >
2024-04-10 20:05:22 +00:00
Samuel Pitoiset
05cd85afc6
radv: add a helper for hashing pipelines
...
Similar between graphics/compute/raytracing pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651 >
2024-04-10 20:05:22 +00:00
Samuel Pitoiset
c6cb3b3b93
radv/rt: remove dead code about intersection shaders in radv_pipeline_get_shader_key()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28651 >
2024-04-10 20:05:22 +00:00
Georg Lehmann
1f4662cc4e
radv: move alu
...
The stats are decent now that aco has an ILP scheduler
Foz-DB Navi31:
Totals from 73549 (92.59% of 79439) affected shaders:
MaxWaves: 2226952 -> 2229352 (+0.11%); split: +0.21%, -0.10%
Instrs: 44690384 -> 44905884 (+0.48%); split: -0.10%, +0.58%
CodeSize: 232666088 -> 233474808 (+0.35%); split: -0.10%, +0.45%
VGPRs: 2998036 -> 2986936 (-0.37%); split: -0.58%, +0.21%
SpillSGPRs: 7176 -> 7170 (-0.08%); split: -0.53%, +0.45%
SpillVGPRs: 1124 -> 1068 (-4.98%); split: -5.07%, +0.09%
Scratch: 6981632 -> 6977792 (-0.06%)
Latency: 297998345 -> 298541597 (+0.18%); split: -0.35%, +0.53%
InvThroughput: 49162321 -> 49039572 (-0.25%); split: -0.46%, +0.21%
VClause: 881737 -> 884147 (+0.27%); split: -0.35%, +0.62%
SClause: 1371928 -> 1373973 (+0.15%); split: -0.78%, +0.92%
Copies: 2920492 -> 2927281 (+0.23%); split: -0.84%, +1.08%
Branches: 890209 -> 890121 (-0.01%); split: -0.03%, +0.02%
PreSGPRs: 2376670 -> 2377251 (+0.02%); split: -0.25%, +0.28%
PreVGPRs: 2229634 -> 2208966 (-0.93%); split: -1.04%, +0.11%
VALU: 25124040 -> 25127521 (+0.01%); split: -0.07%, +0.08%
SALU: 4343167 -> 4361062 (+0.41%); split: -0.23%, +0.65%
VMEM: 1582363 -> 1582245 (-0.01%); split: -0.01%, +0.00%
VOPD: 8709 -> 8708 (-0.01%); split: +2.35%, -2.37%
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27032 >
2024-04-10 17:05:59 +00:00
Georg Lehmann
d9a8ab0e01
radv: sink alu
...
The stats are decent now that aco has an ILP scheduler.
Foz-DB Navi31:
Totals from 50743 (63.88% of 79439) affected shaders:
MaxWaves: 1504722 -> 1506408 (+0.11%); split: +0.12%, -0.01%
Instrs: 37550246 -> 37543687 (-0.02%); split: -0.12%, +0.10%
CodeSize: 194277496 -> 194253004 (-0.01%); split: -0.11%, +0.10%
VGPRs: 2266056 -> 2254320 (-0.52%); split: -0.57%, +0.06%
SpillSGPRs: 7893 -> 6861 (-13.07%); split: -14.03%, +0.95%
SpillVGPRs: 1359 -> 1124 (-17.29%)
Scratch: 7006720 -> 6981632 (-0.36%)
Latency: 268082325 -> 267597538 (-0.18%); split: -0.57%, +0.39%
InvThroughput: 43592221 -> 43287284 (-0.70%); split: -1.14%, +0.44%
VClause: 759701 -> 761164 (+0.19%); split: -0.24%, +0.43%
SClause: 1133209 -> 1138406 (+0.46%); split: -0.32%, +0.78%
Copies: 2639405 -> 2632081 (-0.28%); split: -0.81%, +0.53%
Branches: 830411 -> 831358 (+0.11%); split: -0.02%, +0.13%
PreSGPRs: 1802510 -> 1798852 (-0.20%); split: -0.57%, +0.36%
PreVGPRs: 1755801 -> 1747642 (-0.46%); split: -0.51%, +0.04%
VALU: 20974500 -> 20967009 (-0.04%); split: -0.08%, +0.04%
SALU: 3901240 -> 3900098 (-0.03%); split: -0.23%, +0.20%
VMEM: 1397890 -> 1397486 (-0.03%)
VOPD: 4837 -> 4902 (+1.34%); split: +2.03%, -0.68%
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27032 >
2024-04-10 17:05:58 +00:00
Samuel Pitoiset
8d5072bb7f
radv: fix missing unbind report when a buffer is destroyed
...
There should be a matching unbound operation with
VK_EXT_device_address_binding_report.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
50060072a7
radv: fix missing unbind report when an image is destroyed
...
There should be a matching unbound operation with
VK_EXT_device_address_binding_report.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
ec55364f9b
radv: add a helper to set image bindings
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
91c48d8f43
radv/rmv: fix image binds logging for disjoint images
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
04c9369c55
radv: fix addr binding report for disjoint image binds
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
ea84b50e4e
radv: fix missing addr binding report for WSI image binds
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Samuel Pitoiset
8626844a00
radv/rmv: fix missing image bind logging for WSI images
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659 >
2024-04-10 11:23:40 +00:00
Konstantin Seurer
03483ecb11
radv: Destroy leaf_updateable_pipeline
...
The pipeline was never destroyed. Fixes an assert in ac_sqtt_finish.
Fixes: 217072d ("radv/rt: Force active leaves for every updateable accel struct")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28557 >
2024-04-10 08:23:14 +00:00
Samuel Pitoiset
2526d1020b
radv/rt: stop passing pCreateInfo to radv_ray_tracing_pipeline_cache_search()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:38 +00:00
Samuel Pitoiset
5db1ce3733
radv/rt: handle creation feedback like graphics/compute pipelines
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:38 +00:00
Samuel Pitoiset
c73e5e08e0
radv/rt: constify device in radv_init_rt_stage_hashes()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:38 +00:00
Samuel Pitoiset
7bb437f3d6
radv: stop using a graphics pipeline for generating the graphics key
...
For future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:37 +00:00
Samuel Pitoiset
1b05570d6c
radv: add skip_shaders_cache also for compute/rt pipelines
...
Similarly to graphics pipelines. For future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:37 +00:00
Samuel Pitoiset
f6d9772010
radv: determine if the cache is disabled at device creation time
...
It's a cleanup but also for future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28645 >
2024-04-10 06:38:37 +00:00
Chia-I Wu
18e6bb322e
radv: fix 2d/3d image copy on compute queue
...
build_nir_itoi_compute_shader did not handle copies between 2D and 3D
images.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28605 >
2024-04-09 18:15:41 +00:00
Samuel Pitoiset
74955dbed7
radv: enable VK_EXT_shader_object by default
...
This has been a long and painful extension to implement but finally
RADV has support for it on all supported generations. It's passing
VKCTS and GLCTS through Zink but the number of application using ESO
is currently very limited.
This adds RADV_DEBUG=noeso to disable it for debugging purposes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28374 >
2024-04-08 08:36:14 +00:00
Samuel Pitoiset
87fde606cf
radv: use SPDX-License-Identifier
...
Only files under src/amd/vulkan/** are concerned.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28599 >
2024-04-08 07:17:31 +00:00
Timur Kristóf
f0a354a7a5
radv: Don't set driver locations for last pre-rasterization stage.
...
They were already unused, just don't set them.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:25:32 +02:00
Timur Kristóf
0dbf6e7582
radv: Don't set driver locations for FS outputs.
...
They were already unused, just don't set them.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28553 >
2024-04-05 15:25:24 +02:00