[vlc-devel] [PATCH 1/7] direct3d11: unmap the texture before it's displayed
robux4 at gmail.com
Sat Oct 17 09:37:12 CEST 2015
On Fri, Oct 16, 2015 at 10:03 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2015-10-16 08:46, Steve Lhomme a écrit :
>> This is not direct rendering, this is the regular plane writing in the
>> display picture_t pool.
> Point is, the picture buffer exposed to decoders and filters must remain
> readable until the last reference (other than the vout's own) is released.
That becomes tricky then. There are 2 different cases here:
- the vout pool is used just for display, the decoder uses its own pool
- the vout pool is used directly by the software decoder (zero
For #1 we never need to read the written pixels so it's okay to unmap
it right before we display it. We will not access the pixel pointer
For #2 the decoder needs read access to the buffer as long as the
picture is referenced in the decoder. Given the previously mentioned
D3D11 limitation (on some mobile devices) this is an issue. We cannot
keep it mapped when displaying. We cannot keep it unmapped while the
decoder needs it.
A workaround would be to Unmap during Display and then Map it back
when it's finished. There's a good change the buffer pointer will be
exactly the same, although I noticed that sometimes the buffer is
different for the same texture over time. That's why we don't map it
at startup anymore but everytime we need the buffer...
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel