Commit graph

197982 commits

Author SHA1 Message Date
Silvio Vilerino
e3ab866fea d3d12: Only call CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO when video format changes
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:01 -07:00
Silvio Vilerino
ca2a1e470a d3d12: Remove per frame allocation slice_sizes(picture->num_slice_descriptors)
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:54 -07:00
Silvio Vilerino
53e07e78c7 d3d12: Cache ID3D12VideoEncodeCommandList4 instance if supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:50 -07:00
Silvio Vilerino
b1ea2b06eb d3d12: Cache ID3D12VideoEncoderHeap1 instance if supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:46 -07:00
Silvio Vilerino
a51c3b5bd0 d3d12: Cache ID3D12VideoDevice4 instance if supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:41 -07:00
Silvio Vilerino
702e299f33 d3d12: Remove multiple index calc in d3d12_video_encoder_prepare_input_buffers
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:36 -07:00
Silvio Vilerino
2ffaa9a9f4 d3d12: Remove multiple index calc in d3d12_video_encoder_begin_frame
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:31 -07:00
Silvio Vilerino
712607bbec d3d12: Optimize d3d12_video_encoder_flush
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:26 -07:00
Silvio Vilerino
63db1254ff d3d12: Use a separate queue for encode resolve operations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:21 -07:00
Silvio Vilerino
416398aecb mediafoundation: Only attach stats to last slice mfsample
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:17 -07:00
Silvio Vilerino
80c8994455 mediafoundation: Add pLastSliceFence shortcircuit wait for auto slice mode async slices mode
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:12 -07:00
Silvio Vilerino
fd546c1cde mediafoundation: Refactor frame, multi slice and combine slice IMFSample emission to make it simpler
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:07 -07:00
Silvio Vilerino
f4f619e26e d3d12: Implement last slice signal by splitting Encode/Resolve in two ECL
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:21:01 -07:00
Silvio Vilerino
134274488d mediafoundation: Attach stats deferred buffers to all samples for simplicity
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:55 -07:00
Silvio Vilerino
b4592bbb77 mediafoundation: Add some more trace logging
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:49 -07:00
Silvio Vilerino
43112ce1a4 mediafoundation: Emit multiple MFSamples per slice when CODECAPI_AVEncSliceGenerationMode = 1i
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:43 -07:00
Silvio Vilerino
3de675eef5 mediafoundation: Prepare for multi sample multi slice
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:38 -07:00
Silvio Vilerino
e612709141 mediafoundation: Add support for setting CODECAPI_AVEncSliceGenerationMode
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:21 -07:00
Silvio Vilerino
a6f84de5b0 mediafoundation: emit subregions samples before pAsyncFence wait to reduce latency
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:13 -07:00
Silvio Vilerino
4bc6ace7a1 mediafoundation: Attach async stats DXGI buffers without CPU fence wait
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:08 -07:00
Silvio Vilerino
d7384e9f65 mediafoundation: Set ConfigureBitstreamOutputSampleAttributes earlier for async subregion notifications do not need resolved metadata for it
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:20:03 -07:00
Silvio Vilerino
791a966510 mediafoundation: Add Resolve completion fence to stats IDXGIBuffers
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:19:55 -07:00
Silvio Vilerino
88492ee80b mediafoundation: Helpers ConfigureBitstreamOutputSampleAttributes/ConfigureStatsMetadataOutputSampleAttributes
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:19:26 -07:00
Pohsiang (John) Hsu
932401ddf0 mediafoundation: add stats resource pool so we can use pool for QP map as well
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:19:14 -07:00
Samuel Pitoiset
7cd12e5c6a amd: move CP emit helpers to ac_cmdbuf_cp.c/h
Seems more organized this way.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
e0ffc41d9a amd,radv: move SDMA utility helpers to common code
Only simple ones for now. Other functions need more rework.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
4989b6e6b9 amd,radv,radeonsi: add ac_emit_cp_write_data_{head}()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
1c3754a271 radv: use ac_emit_cp_copy_data() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
ed7f9df864 amd: add a predicate parameter to ac_emit_cp_copy_data()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
29c2d02d64 amd,radv,radeonsi: add ac_emit_cp_load_context_reg_index()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:20 +02:00
Samuel Pitoiset
c7c237dd27 amd,radv,radeonsi: add ac_emit_cp_nop()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:31:13 +02:00
Samuel Pitoiset
5801986f53 amd: add missing _cp_ to some emit helpers
Just for consistency with other helpers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:30:34 +02:00
Samuel Pitoiset
a0117b5e74 amd,radv: add ac_emit_cp_atomic_mem()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:30:34 +02:00
Samuel Pitoiset
93f3b36b55 radv: use ac_emit_cp_copy_data() more for perfcounters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37881>
2025-10-21 13:30:34 +02:00
Georg Lehmann
dae502a780 treewide: use nir_load_global_constant alias of nir_build_load_global_constant
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:39:53 +02:00
Georg Lehmann
cf4ab485ea nir: remove manual nir_load_global_constant
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:39:53 +02:00
Georg Lehmann
654bd74c60 treewide: use nir_store_global alias of nir_build_store_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Georg Lehmann
2306cba65b nir: remove manual nir_store_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Georg Lehmann
9e41a7c139 treewide: use nir_load_global alias of nir_build_load_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Georg Lehmann
77540cac8c nir: remove manual nir_load_global
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37959>
2025-10-21 12:37:58 +02:00
Samuel Pitoiset
9ebda88e34 radv: remove an obsolete comment about SMEM stores
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ACO doesn't use SMEM store instructions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:11 +00:00
Samuel Pitoiset
63099554ac radv: simplify L2 cache flushes on < GFX12
To be closer to RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:11 +00:00
Samuel Pitoiset
52e036fa9f radv: remove useless parameter to gfx10_cs_emit_cache_flush()
gfx9_eop_bug_va is always 0 on GFX10+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:10 +00:00
Samuel Pitoiset
c8de5a7479 radv: pass int_sel to radv_cs_emit_write_event_eop()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37871>
2025-10-21 07:03:09 +00:00
Samuel Pitoiset
eb65d17e00 radv: simplify error handling when creating descriptor pools
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
11daa11c4e radv: use vk_zalloc2() for allocating the descriptor pool
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
6106d9e818 radv: simplify allocating pool entries for descriptor sets
A complete new strategy allocation will be implemented on top of this.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
d4cb7d160d radv: add a small helper to destroy descriptor pool entries
No need to duplicate code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:29 +00:00
Samuel Pitoiset
d29959f50d radv: remove an useless check when destroying descriptor sets
There is already an assertion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37917>
2025-10-21 06:43:28 +00:00
Lionel Landwerlin
2b6c75423e anv: reenable VK_KHR_maintenance8 on pre-Xe2 platforms
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37929>
2025-10-21 06:13:10 +00:00