1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00
mpv/DOCS/man
James Ross-Gowan 68eac1a1e7 vo_gpu: d3d11: initial implementation
This is a new RA/vo_gpu backend that uses Direct3D 11. The GLSL
generated by vo_gpu is cross-compiled to HLSL with SPIRV-Cross.

What works:

- All of mpv's internal shaders should work, including compute shaders.

- Some external shaders have been tested and work, including RAVU and
  adaptive-sharpen.

- Non-dumb mode works, even on very old hardware. Most features work at
  feature level 9_3 and all features work at feature level 10_0. Some
  features also work at feature level 9_1 and 9_2, but without high-bit-
  depth FBOs, it's not very useful. (Hardware this old is probably not
  fast enough for advanced features anyway.)

  Note: This is more compatible than ANGLE, which requires 9_3 to work
  at all (GLES 2.0,) and 10_1 for non-dumb-mode (GLES 3.0.)

- Hardware decoding with D3D11VA, including decoding of 10-bit formats
  without truncation to 8-bit.

What doesn't work / can be improved:

- PBO upload and direct rendering does not work yet. Direct rendering
  requires persistent-mapped PBOs because the decoder needs to be able
  to read data from images that have already been decoded and uploaded.
  Unfortunately, it seems like persistent-mapped PBOs are fundamentally
  incompatible with D3D11, which requires all resources to use driver-
  managed memory and requires memory to be unmapped (and hence pointers
  to be invalidated) when a resource is used in a draw or copy
  operation.

  However it might be possible to use D3D11's limited multithreading
  capabilities to emulate some features of PBOs, like asynchronous
  texture uploading.

- The blit() and clear() operations don't have equivalents in the D3D11
  API that handle all cases, so in most cases, they have to be emulated
  with a shader. This is currently done inside ra_d3d11, but ideally it
  would be done in generic code, so it can take advantage of mpv's
  shader generation utilities.

- SPIRV-Cross is used through a NIH C-compatible wrapper library, since
  it does not expose a C interface itself.

  The library is available here: https://github.com/rossy/crossc

- The D3D11 context could be made to support more modern DXGI features
  in future. For example, it should be possible to add support for
  high-bit-depth and HDR output with DXGI 1.5/1.6.
2017-11-07 20:27:13 +11:00
..
af.rst af, vf: improvements to libavfilter bridge 2017-05-31 17:42:55 +02:00
ao.rst ao_rsound: allow setting the host 2017-08-21 15:46:00 +02:00
changes.rst manpage: mention the client API/interface change logs 2016-09-02 09:48:35 +02:00
encode.rst man: fix grammar issues 2015-12-19 09:26:41 +01:00
input.rst demux: improve and optimize cache pruning and seek range determination 2017-11-04 23:18:42 +01:00
ipc.rst manpage: document tricky issue with IPC observe_property command 2017-05-16 12:20:39 +02:00
javascript.rst manpage: upcase JavaScript for section title case consistency. 2017-07-17 15:42:10 +03:00
libmpv.rst manpage: define stricter rules for C plugin return values 2017-01-14 17:41:04 +01:00
lua.rst manpage: replace gendered pronouns 2017-04-19 16:05:56 +02:00
mpv.rst stats: add documentation 2017-10-09 20:48:44 +02:00
options.rst vo_gpu: d3d11: initial implementation 2017-11-07 20:27:13 +11:00
osc.rst osc: add user_opts.boxmaxchars for box layout title limit 2017-04-19 20:35:58 +01:00
stats.rst stats: clarify documentation 2017-10-13 00:28:41 +02:00
vf.rst vf_eq: remove this filter 2017-08-22 15:58:49 +02:00
vo.rst Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00