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
Timur Kristóf
450c8f159b
radv: Don't set driver locations for mesh shaders.
...
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:15 +02:00
Timur Kristóf
a554e44eae
radv: Use NIR IO semantics for VS input location mapping.
...
The IO semantics already contain all the information needed
for VS inputs, so there is no need use driver locations.
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:24:43 +02:00
Samuel Pitoiset
14ba56718f
radv: make sure the heap budget is less than or equal to the heap size
...
Reported by Hans-Kristian.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28575 >
2024-04-05 12:43:09 +00:00
Samuel Pitoiset
a29fda1ba0
radv: move radv_printf_data to radv_printf.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
9223b80086
radv: remove old comment in radv_cs.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
6428270408
radv: move radv_queue_family_to_ring() to radv_queue.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
6e4f26827c
radv: move radv_get_user_sgpr() to radv_shader.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Samuel Pitoiset
80683c220b
radv: make radv_get_vgt_index_size() static
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28592 >
2024-04-05 12:18:38 +00:00
Rhys Perry
be8b8722f9
radv: memset radv_pipeline_cache_object data
...
This silences Valgrind warnings.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28549 >
2024-04-05 11:56:25 +00:00
Rhys Perry
c3c138b10f
radv: optimize msad_4x8 to mqsad_4x8
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26251 >
2024-04-05 11:01:39 +00:00
Samuel Pitoiset
69b911bc53
radv: remove radv_private.h
...
This file was a giant mess and I'm very happy to remove it entirely.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
367cf70a29
radv: move RADV_USE_WSI_PLATFORM define to radv_wsi.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
28eefbadeb
radv: move CLOCK_MONOTONIC_RAW define to radv_physical_device.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
e8269c01cb
radv: move RADV_API_VERSION to radv_instance.h
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00
Samuel Pitoiset
e25882352b
radv: move RADV_SUPPORT_CALIBRATED_TIMESTAMPS to radv_physical_device.c
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568 >
2024-04-04 21:57:46 +00:00