Seungha Yang
27c02a0b80
d3d12decoder: Hold reference pictures in fence data
...
Keep reference pictures alive during executing decoding commands
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6709 >
2024-04-23 10:08:19 +00:00
Seungha Yang
0f5f170a40
d3d12vp9dec: Disallow resolution change to larger size on non-keyframe
...
Intel GPU seems to be crashing if the case happens.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6709 >
2024-04-23 10:08:18 +00:00
Seungha Yang
700c00eda3
d3d12decoder: Fix potential use after free
...
A DPB buffer held by codec picture object may not be writable
at the moment, then gst_buffer_make_writable() will unref passed buffer.
Specifically, the use after free or double free can happen if:
* Crop meta of buffer copy is required because of non-zero
top-left crop position
* zero-copy is possible with crop meta
* A picture was duplicated, interlaced h264 stream for example
Interlaced h264 stream with non-zero top-left crop position
is not very common but it's possible configuration in theory.
Thus gst_buffer_make_writable() should be called with
GstVideoCodecFrame.output_buffer directly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6706 >
2024-04-22 13:28:06 +00:00
Seungha Yang
5179cbccfa
d3d12testsrc: Use shared 11on12 device
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6697 >
2024-04-20 04:16:48 +09:00
Seungha Yang
cd97275a19
d3d12device: Hold d3d11on12 device to be shared
...
d3d11on12 device seems to be occupying a bit of GPU memory
Hold the instance in GstD3D12Device so that it can be shared
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6697 >
2024-04-20 04:16:41 +09:00
Seungha Yang
8e4fe98361
d3d12videosink: Handle mouse double click and modifier
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6693 >
2024-04-19 16:11:30 +00:00
Seungha Yang
dabce9635d
d3d12videosink: Disconnect window's signal on dispose
...
Same as the commit of 7b69d1758f
but for d3d12videosink.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6692 >
2024-04-19 21:25:06 +09:00
Seungha Yang
6659bd6362
d3d12videosink: Handle external HWND's mouse/keyboard events
...
OS will not propagate the event to child HWND if it's handled by
the parent. Thus, navigation event should be handled by parent HWND's
event handler.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6692 >
2024-04-19 21:24:52 +09:00
Seungha Yang
f6ec4e6256
d3d12overlaycompositor: Add support for d3d12 memory
...
Don't allocate d3d12 texture if overlay is d3d12 memory already
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6620 >
2024-04-14 09:55:41 +00:00
Seungha Yang
13d892d336
d3d12: Move gst_d3d12_buffer_copy_into method to library
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6620 >
2024-04-14 09:55:41 +00:00
Seungha Yang
e597dcdf0d
d3d12encoder: Fix buffer pool leak
...
Add missing buffer pool release
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6628 >
2024-04-13 14:55:09 +00:00
Seungha Yang
ad6670ba81
d3d12decoder: Always output sharable texture
...
Because shared heap's additional costs is not significant,
use D3D12_HEAP_FLAG_SHARED for resource can be shared over process
boundary. And enables render target for d3d11 interop in the process.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6513 >
2024-04-03 02:05:25 +00:00
Seungha Yang
d00c26cdc8
d3d12screencapturesrc: Use gst_d3d12_memory_get_d3d11_texture()
...
... and use fence to wait for GPU sync
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6499 >
2024-04-02 03:43:59 +09:00
Seungha Yang
7d0e90b7bc
d3d12: Move core part to gst-libs
...
Move buffer pool, converter, and device abstraction layer to
public library
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494 >
2024-04-01 10:37:50 +00:00
Seungha Yang
7829315305
d3d12memory: Define new D3D12 map flags
...
Define GST_MAP_READ_D3D12 and GST_MAP_READ_D3D12 flags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494 >
2024-04-01 10:37:50 +00:00
Seungha Yang
abeccdd6bc
d3d12: Make resource getter methods consistent
...
Returns COM pointer directly everywhere
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494 >
2024-04-01 10:37:49 +00:00
Seungha Yang
706d5402fa
d3d12: Remove device11on12 wrapping layer
...
It was added to avoid symbol conflict between DirectX-header project
and Windows SDK, but symbol conflict does not happen
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494 >
2024-04-01 10:37:49 +00:00
Seungha Yang
927e249557
d3d12bufferpool: Use d3dx12.h format table
...
The format table in SDK header defines all required information
already.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494 >
2024-04-01 10:37:49 +00:00
Seungha Yang
0527f27204
d3d12: Add a helper method for device equality check
...
GstD3D12Device object itself is not singltons anymore but
underlying private struct is singltons.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6494 >
2024-04-01 10:37:49 +00:00
Seungha Yang
bbdfa00b7b
d3d12: Add support for cross-compile
...
... and fix bunch of GCC reported warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6435 >
2024-03-25 11:41:25 +00:00
Seungha Yang
6c80d2f5f8
d3d12: Allow building without WGC support
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6435 >
2024-03-25 11:41:25 +00:00
Seungha Yang
2649d2ae62
d3d12: Port to d3dshader library
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6434 >
2024-03-25 00:02:12 +09:00
Seungha Yang
43da9b4249
d3d12: Update shader to be Shader Model 5.0 compatible
...
And use fxc HLSL compiler
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6434 >
2024-03-24 17:15:22 +09:00
Seungha Yang
0c148a96db
d3d12: Add IPC elements
...
Adding d3d12ipcsink and d3d12ipcsrc elements, equivalent to D3D11 ones.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428 >
2024-03-22 23:09:12 +09:00
Seungha Yang
0006ad1f86
d3d12: Add buffer copy helper method
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428 >
2024-03-22 23:09:05 +09:00
Seungha Yang
c612af6d42
d3d12commandqueue: Always invoke notify asynchronously
...
Otherwise the callback thread is unpredictable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428 >
2024-03-22 20:45:01 +09:00
Seungha Yang
18091f0115
d3d12memory: Update for API interop
...
Add support for destroy notify in case of wrapped memory, and
allow setting external fence for interop
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428 >
2024-03-22 20:01:16 +09:00
Seungha Yang
0d559bead9
d3d12: Make primary fence sharable
...
Create primary fence with D3D12_FENCE_FLAG_SHARED flag so that
the fence can be shared with other APIs or processes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428 >
2024-03-22 18:57:26 +09:00
Seungha Yang
b417c62940
d3d12device: Set debugging friendly object name
...
Build object name with DXGI adapter index
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395 >
2024-03-19 12:03:55 +00:00
Seungha Yang
6de5eab1e4
d3d12: Suppress expected leak reports
...
Such leaks are expected and intended ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395 >
2024-03-19 12:03:55 +00:00
Seungha Yang
a1c8fc6163
d3d12device: Keep device object permanently
...
Because ID3D12Device objects are singletons per adapter,
GstD3D12Device was following the API design, that is, keep track
of global GstD3D12Device objects and reuses it.
That means ID3D12Device object can be released at the time
when GstD3D12Device is destroyed.
But exetrnal APIs such as NVENC does not seem to be happy
with the released ID3D12Device, that could be a driver bug though.
Let's hold already opened ID3D12Device permanently without releasing
it for now.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395 >
2024-03-19 12:03:55 +00:00
Seungha Yang
17d6c7350c
d3d12commandqueue: Add drain method
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395 >
2024-03-19 12:03:55 +00:00
Seungha Yang
393fb4733c
d3d12: Use native device handle if possible
...
Various abstraction objects such as command queue/list/allocator
can be constructed without GstD3D12Device
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395 >
2024-03-19 12:03:55 +00:00
Seungha Yang
331522210f
d3d12commandqueue: Allow empty command list
...
Just increase fence value and signal the queue in that case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395 >
2024-03-19 12:03:54 +00:00
Seungha Yang
8acf844fed
d3d12: Fix SDK debug layer activation
...
Debug layer must be enabled before creating device. Otherwise
already opened devices before the activation will be removed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6382 >
2024-03-16 21:25:38 +09:00
Seungha Yang
94dfef68e1
d3d12device: Fix IDXGIFactory2 leak
...
factory passed to gst_d3d12_device_find_adapter() method is valid
handle already
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6340 >
2024-03-12 22:06:01 +00:00
Seungha Yang
c9aaf39279
cuda,d3d11,d3d12bufferpool: Disable preallocation
...
Do not chain up to parent's GstBufferPool::start() which will do
preallocation. We don't want it to be preallocated
since there are various cases where negotiated downstream buffer pool is
not used at all (e.g., zero-copy decoding, IPC elements).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6326 >
2024-03-12 18:07:29 +00:00
Seungha Yang
4db7eb0290
d3d12screencapturesrc: Add support for WGC API
...
Adding support for window and monitor capturing by using
Windows Graphics Capture API.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6256 >
2024-03-08 01:05:24 +09:00
Seungha Yang
63ef405131
d3d12memory: Implement NT handle caching and custom user data support
...
Same as the d3d11 memory implementation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6256 >
2024-03-08 01:03:28 +09:00
Seungha Yang
d0713e029c
d3d11memory, d3d12memory: Fix outstanding memory count tracing
...
Gets being released memory back to queue even if allocator is flushing
in order to count the number of outstanding memory objects.
Also, clear queue if there's no outstanding memory object and
allocator is flushing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240 >
2024-02-29 11:57:50 +00:00
Seungha Yang
693dbc9667
d3d12screencapturesrc: Fix choppy display
...
According to recommendation from MS, IDXGIOutputDuplication::ReleaseFrame()
needs to be called just before IDXGIOutputDuplication::AcquireNextFrame()
for performance reasons, so that driver can accumulate dirty rects
and update texture at once. But it seems to cause choppy output.
Do release acquired frame immediately once processing done,
like d3d11 implementation does.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6092 >
2024-02-11 13:13:18 +00:00
Seungha Yang
36c4ef361b
d3d12: Add VP8 decoder
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6088 >
2024-02-10 21:23:51 +09:00
Seungha Yang
e2eff3e4a3
d3d12decoder: Fix bitstream buffer usage
...
Resource state of a buffer in upload heap should stay in
generic-read although it's effectively in common state. Some drivers
complains about the wrong state.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6088 >
2024-02-10 21:23:28 +09:00
Seungha Yang
35e5178f0e
d3d12: Fix potential self thread join
...
Fence data could hold GstD3D12Device directly or indirectly.
Then if it's holding last refcount, the device object will
be released from the device object's internal thread,
and will try join self thread.
Delegates it to other global background thread to avoid
self thread joining.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6042 >
2024-02-05 01:37:32 +09:00
Seungha Yang
1c0f224f05
d3d12memory: Remove unused method
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6042 >
2024-02-03 23:22:58 +09:00
Seungha Yang
3855646f1d
d3d12: Add MPEG-2 decoder
...
Most of code additions are just gluing already implemented
GstDxva and GstD3D12Decoder interfaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5979 >
2024-01-25 11:45:23 +00:00
Seungha Yang
3991801d4a
d3d12av1dec: Fix object type name on multi-gpu system
...
Fixing typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5964 >
2024-01-24 22:35:17 +00:00
Seungha Yang
4fb284346e
d3d12h264enc: Fix profile support check
...
Add missing CheckFeatureSupport() call, and remove unused field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5952 >
2024-01-22 20:10:24 +09:00
Seungha Yang
f44d5d18f3
d3d12: Pass target rectangle to ClearRenderTargetView()
...
Some drivers seem to be crashing if ClearRenderTargetView() is called
for P010/P016 texture's second subresource (UV plane) without
specified target rectangle.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5952 >
2024-01-22 19:40:08 +09:00
Seungha Yang
4e1bf149d0
d3d12: Add H.264 video encoder
...
Adding video encoder element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5808 >
2024-01-19 12:47:35 +00:00
Seungha Yang
0cceb6f68f
d3d12memory: Don't use persistent staging buffer map
...
Persistent map is not recommended in case of readback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5919 >
2024-01-14 13:10:56 +00:00
Seungha Yang
077470913d
d3d12decoder: Use D3D12_HEAP_FLAG_CREATE_NOT_ZEROED flag
...
Since the first access to a texture is always write, zero initialization
is unnecessary
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5919 >
2024-01-14 13:10:56 +00:00
Seungha Yang
a242b93f33
d3d12decoder: Release decoder and heap on stop
...
Sometimes driver crash happens if ID3D12VideoDevice got closed first,
and then ID3D12VideoDecoderHeap/ID3D12VideoDecoder are released.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895 >
2024-01-09 13:52:44 +00:00
Seungha Yang
6ffed9b3dc
d3d12videosink: Fix crash on set_buffer()
...
set_buffer() can be called with null buffer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895 >
2024-01-09 13:52:44 +00:00
Seungha Yang
7f2b4b6b09
d3d12: Fix warnings reported by debug layer
...
Fixing below debug layer report
ID3D12Device::CreateCommittedResource: Ignoring InitialState D3D12_RESOURCE_STATE_COPY_DEST.
Buffers are effectively created in state D3D12_RESOURCE_STATE_COMMON.
Buffer resource will be automatically promoted to D3D12_RESOURCE_STATE_COPY_DEST
at the very first COPY operation time.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895 >
2024-01-09 13:52:44 +00:00
Seungha Yang
e1ecd1de2f
d3d12: Simplify fence data setup
...
Adding COM and GstMiniObject specific methods to skip passing
free function pointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895 >
2024-01-09 13:52:44 +00:00
Seungha Yang
2c3f3c0cb6
d3d12device: Print live objects on finalize()
...
The report from debug layer can help tracing resource leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895 >
2024-01-09 13:52:44 +00:00
Seungha Yang
0077c4beb0
d3d12decoder: Set buffer flag on output buffer
...
... and remove unnecessary condition check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891 >
2024-01-07 13:38:44 +00:00
Seungha Yang
02563605e8
d3d12videosink: Add gamma, primaries and sampling filter properties
...
Add properties to control conversion methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891 >
2024-01-07 13:38:44 +00:00
Seungha Yang
368d8b9252
d3d12videosink: Add support for 3D transformation
...
Add x, y, and z axis rotation with scaling support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891 >
2024-01-07 13:38:44 +00:00
Seungha Yang
72237d2563
d3d12videosink: Add support for MSAA
...
Adding "msaa" property to support MSAA rendering
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891 >
2024-01-07 13:38:44 +00:00
Seungha Yang
de331217aa
d3d12videosink: Add support for fullscreen mode
...
Adding "fullscreen-on-alt-enter" and "fullscreen" properties so that
use can control fullscreen mode switch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5891 >
2024-01-07 13:38:44 +00:00
Seungha Yang
ae3ed20f41
d3d12: Add screen capture element
...
Since DXGI desktop duplication API does not work with Direct3D12 device,
this element will use Direct3D11 device to acquire frame.
Then other rendering operations (e.g., texture copy, render pipeline) will
happen using Direct3D12 API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5883 >
2024-01-05 21:27:35 +09:00
Seungha Yang
1b86c9d370
d3d12decoder: Try zero-copy in case of reverse playback too
...
In case of tier 1 decoder, always use reference-only picture to avoid
fixed-size pool limitation and output decoded picture without
copy even for negative rate. Also do not use copy queue for GPU to GPU
copy. Copy queue is specialized for upload/download and may occupy
PCIE bandwidth. Use direct queue as recommended by vendors.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877 >
2024-01-03 02:08:53 +09:00
Seungha Yang
1fb44b8160
d3d12decoder: Fix crash on flush
...
On flush event, baseclass will discard all pictures from DPB
but there can be still in-flight commands not finished yet.
Use our command queue, allocator and fence data helper objects
to keep resource available during command execution.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877 >
2024-01-03 01:36:42 +09:00
Seungha Yang
d3b3a1c00a
d3d12: Add {set,get}_user_data() methods to command allocator
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877 >
2024-01-03 01:19:39 +09:00
Seungha Yang
9d5277e70e
d3d12decoder: Fix barrier usage
...
Common state promotion and decay does not seem to be applied to
decoder commands. Use barriers explicitly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5877 >
2024-01-03 01:17:32 +09:00
Seungha Yang
087e39564d
d3d12videosink: Fix buffer leak
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
b0ef890726
d3d12device: Store adapter index
...
... and remove unused fence object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
0577d1c9de
d3d12: Reduce shader visible descriptor size
...
Shader visible descriptors occupy GPU resource and there are hardware
limits. Thus, in order to minimize the amount of shader visible heaps,
only non shader visible descriptor heap (staging) will be held by d3d12memory.
Then converter will copy the staging descriptor to shader visible
descriptor heap per draw.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
0ce6e752e4
d3d12: Use CREATE_NOT_ZEROED heap flag if possible
...
Zero initialization would have overhead and it's not required
most cases except for textures. Use CREATE_NOT_ZEROED flag
in case of buffer resource or if a texture will be rendered without any
prior read operation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
a1ba38cd64
d3d12: Add compositor element
...
Adding d3d12compositor element. d3d12compositor will build GPU commands
asynchronously and each command is serialized at final render stage.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
996346f8d3
d3d12converter: Don't map output buffer with write flag
...
Conversion will happen when constructed command list is executed,
not by converter element. Thus this object should not map output buffer
with write flag which will result in error if multiple threads
are building commands for the same output target frame.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
bffbf0d951
d3d12converter: Add support for texture upload
...
If buffer is not a d3d12 memory or allocated by other device,
upload to internal d3d12 memory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
f4fe17d8d2
d3d12converter: Add support for blending
...
Create new PSO if blend state update is required
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:47 +00:00
Seungha Yang
7c701058ed
d3d12: Add testsrc element
...
Adding testsrc element with d2d interop support via d3d11on12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5875 >
2024-01-02 13:02:46 +00:00
Seungha Yang
2f091e7118
d3d12: Add video sink element
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
660f2d7d27
d3d12: Add convert element
...
Implement converter object with convert element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
4198bd6932
d3d12: Add helper object for fence operation
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
eeb57061d2
d3d12: Enable plugin only for Windows8 or newer
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
3e49d6a75f
d3d12: Define more formats
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
48cfca413d
d3d12: Add header containing core features
...
... and include the single header instead of listing many ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
41d8a12649
d3d12: Remove unused methods
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
5ce2a7f64f
d3d12bufferpool: Don't pre-allocate memory for size calculation
...
Unlike d3d11, we can know CPU accessible memory layout without
allocation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
d316356bf2
d3d12memory: Add alloc_wrapped() method
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
3308a976bd
d3d12: Add upload element
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
e4f794cbdd
d3d12bufferpool: Wait fence before reusing buffer
...
Buffer can be released without waiting fence for previous commands
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:39:00 +00:00
Seungha Yang
1c5bba4b6b
d3d12decoder: Remove ID3D12Device4 interface requirement
...
Old OS may not support the interface. And allow 11_0 feature level
hardware.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
4e5d4a45a3
d3d12decoder: Reduce the number of resource barriers
...
Single barrier per texture is sufficient in case of array-of-textures.
Avoid unnecessary decay barriers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
e6bdb0458c
d3d12decoder: Use flexible task queue
...
Instead of using fixed size command allocator array, make it
resizable.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
efc023e76e
d3d12: Rework command scheduling
...
* Use single fence object per queue and remove GstD3D12Fence
implementation
* Add a helper method for texture copy
* Run background thread and release unused resource from the thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
6d7d9291c3
d3d12: Add resource pool objects
...
Adding pool objects for command list, command allocator, and descriptor
heap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
93458c0155
d3d12memory: Add more SRV/RTV getter methods
...
Adding a method so that memory object can create SRV/RTV
on external descriptor heap. And remove unused methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
2578f234dd
d3d12: Remove d3d11 dependency
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870 >
2023-12-29 14:38:59 +00:00
Seungha Yang
800a83b435
d3d12decoder: Implement threaded decoding
...
To achieve maximum throughput, waiting on command commit thread
is not ideal. And render-delay will introduce unwanted latency.
Best is to split thread and wait finished decoding job in a dedicated
output thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812 >
2023-12-15 22:56:33 +09:00
Seungha Yang
7471db9a30
d3d12decoder: Disable d3d11 interop
...
It does not seem to work with some AMD iGPU
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812 >
2023-12-15 20:40:21 +09:00
Seungha Yang
7afa914054
d3d12fence: Reset fence after waiting done
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812 >
2023-12-15 19:48:40 +09:00
Seungha Yang
a24a155279
d3d12: Enable debug layer
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812 >
2023-12-15 19:48:40 +09:00
Seungha Yang
7443cc00b5
d3d12: Requires ID3D12Device4 interface
...
ID3D12Device4::CreateCommandList1() method is required
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812 >
2023-12-15 19:48:39 +09:00
Seungha Yang
818c95e8c3
d3d12: Update allocation params signalling
...
Sync up with d3d11 implementation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812 >
2023-12-15 19:48:36 +09:00