Commit graph

214053 commits

Author SHA1 Message Date
Silvio Vilerino
e4d8a49fcd d3d12: Only check H264 video caps if configuration changed between frames
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:40 -07:00
Silvio Vilerino
8fd82cb339 d3d12: d3d12_video_encoder_get_slice_bitstream_data use regular Map/Unmap
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:34 -07:00
Silvio Vilerino
1dc76fcaa8 d3d12: Use readback heaps for staging bitstream allocations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:30 -07:00
Silvio Vilerino
9b131f1407 d3d12: Video Encode - Make some parameters const & instead of by value
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:24 -07:00
Silvio Vilerino
1ffefc3e32 d3d12: Use cached heap allocations for output bitstreams instead of allocating per frame
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:18 -07:00
Silvio Vilerino
adbb07e927 d3d12: Use cached heap allocations for barriers instead of allocating per frame
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:14 -07:00
Silvio Vilerino
b076cfdf22 d3d12: Remove unused d3d12_video_encoder::m_transitionsBeforeCloseCmdList
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:10 -07:00
Silvio Vilerino
6f9c49f6f5 d3d12: Only check HEVC video caps if configuration changed between frames
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37982>
2025-10-21 09:22:05 -07:00
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
Valentine Burley
daa3ed7fea ci/deqp: Also print logs to logcat on Android
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a patch for dEQP: for non-APK builds running on Android, duplicate
dEQP output to both stdout and Android's logcat, making test output
visible in logcat.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37933>
2025-10-21 12:23:40 +00: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