[FFmpeg-devel] [PATCH v3 1/2] dxva: wait until D3D11 buffer copies are done before submitting them
Soft Works
softworkz at hotmail.com
Tue Aug 11 09:58:15 EEST 2020
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Steve Lhomme
> Sent: Tuesday, August 11, 2020 6:35 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v3 1/2] dxva: wait until D3D11 buffer
> copies are done before submitting them
[...]
> > But SetMultithreadProtected in fact has the effect of protecting the
> > methods from ID3D11DeviceContext (not device).
> > Like I explained several times already.
> >
> >
> > Luckily I've just seen that there has been a change meanwhile.
> > The undocumented behavior has finally been made public by adding a
> > DX11 version of SetMultithreadProtected (which does the same as what
> > happens when you use the DX10 version with DX11)
> >
> > https://docs.microsoft.com/en-us/windows/win32/api/d3d11_4/nn-
> d3d11_4-
> > id3d11multithread
>
> OK, this is very interesting. It certainly clarifies that it's ID3D11DeviceContext
> related. The documentation is still sketchy though.
> For example ::Enter() [1] says that it enters a device critical section, not a
> device context critical section. So if you have multiple device context
> everything is blocked. This kinda defeats the use of multiple threads.
>
> Also this interface is not available until Windows 10 Creator Update. So for
> example it cannot be used on Windows 7. Maybe the D3D10 version has the
> same effect but there's no guarantee.
Still playing "the doubtful" is not a sincere reaction after having been
proven wrong.
> I'll try without the mutex (old API) on Windows 7 and see the effect.
My patch requires feature level 11_1:
https://github.com/softworkz/ffmpeg_dx11/commit/c09cc37ce7f513717493e060df740aa0e7374257#diff-08dfe4cade908944fd2815bf36309d7bR591-R592
Windows 7 does not have DX11.1
(there's a 11.1 platform update for Win 7 but it doesn't provide full 11.1)
For Win7 and below we're using D3D9 with DXVA2 only.
Kind regards,
softworkz
More information about the ffmpeg-devel
mailing list