1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 06:11:10 +00:00
mpv/video/out
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
..
cocoa input: merge mouse wheel and axis keycodes 2017-09-03 20:31:44 +10:00
d3d11 vo_gpu: d3d11: initial implementation 2017-11-07 20:27:13 +11:00
gpu vo_gpu: d3d11: initial implementation 2017-11-07 20:27:13 +11:00
opengl vo_gpu: d3d11: initial implementation 2017-11-07 20:27:13 +11:00
vulkan vo_gpu: export the GLSL format qualifier for ra_format 2017-11-07 20:27:13 +11:00
wayland wayland_common: rewrite from scratch 2017-10-03 19:36:02 +01:00
win32 droptarget: fix style and refactor 2017-03-26 00:41:16 +11:00
aspect.c aspect: change license to LGPL 2017-06-17 17:08:51 +02:00
aspect.h aspect: change license to LGPL 2017-06-17 17:08:51 +02:00
bitmap_packer.c bitmap_packer: remove some unused functions 2016-07-01 20:29:45 +02:00
bitmap_packer.h bitmap_packer: remove some unused functions 2016-07-01 20:29:45 +02:00
cocoa_common.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
cocoa_common.m Revert "cocoa: re-enable double buffering" 2017-09-22 23:08:46 +10:00
d3d_shader_420p.h
d3d_shader_yuv.hlsl
dither.c
dither.h
drm_atomic.c Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00
drm_atomic.h Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00
drm_common.c video : Move drm options to substruct. 2017-10-23 21:08:20 +02:00
drm_common.h video : Move drm options to substruct. 2017-10-23 21:08:20 +02:00
drm_prime.c Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00
drm_prime.h Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00
filter_kernels.c vo_opengl: refactor scaler LUT weight packing/loading 2017-09-04 13:53:14 +02:00
filter_kernels.h vo_opengl: refactor scaler LUT weight packing/loading 2017-09-04 13:53:14 +02:00
vo_caca.c Add checks for HAVE_GPL to various GPL-only source files 2017-10-10 15:51:16 +02:00
vo_direct3d.c Add checks for HAVE_GPL to various GPL-only source files 2017-10-10 15:51:16 +02:00
vo_drm.c video : Move drm options to substruct. 2017-10-23 21:08:20 +02:00
vo_gpu.c vo_gpu: potentially fix icc-profile-auto updating 2017-11-01 01:58:16 +01:00
vo_image.c image_writer, vo_image: change license to LGPL 2017-06-18 15:45:24 +02:00
vo_lavc.c vo_lavc: remove messy delayed subtitle rendering logic 2017-11-07 05:29:26 +01:00
vo_mediacodec_embed.c vo: add mediacodec_embed output driver 2017-10-09 18:36:54 +02:00
vo_null.c vo.c, vo.h, vo_null.c: change license to LGPL 2017-05-10 15:06:20 +02:00
vo_opengl_cb.c vo_gpu: fix video sometimes not being rerendered on equalizer change 2017-10-17 09:07:35 +02:00
vo_rpi.c vo_rpi: fix build (probably) 2017-10-17 09:28:00 +02:00
vo_sdl.c input: merge mouse wheel and axis keycodes 2017-09-03 20:31:44 +10:00
vo_tct.c vo_tct: check ioctl result 2017-02-20 14:19:57 +01:00
vo_vaapi.c vaapi: move legacy code to vo_vaapi.c 2017-09-29 18:32:56 +02:00
vo_vdpau.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vo_x11.c build: make various x11 protocol extension libs mandatory 2017-04-21 07:30:03 +02:00
vo_xv.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vo.c vo: fix reference to mediacodec_embed 2017-10-09 21:49:01 +02:00
vo.h vo: add VO_CAP_NOREDRAW for upcoming vo_mediacodec_embed 2017-10-09 18:36:54 +02:00
w32_common.c input: merge mouse wheel and axis keycodes 2017-09-03 20:31:44 +10:00
w32_common.h w32_common, w32_keyboard: change license to LGPL 2017-06-24 12:54:45 +02:00
wayland_common.c wayland_common: check monitor scale 2017-10-22 06:49:35 +01:00
wayland_common.h wayland_common: improve cursor code and scale cursor properly 2017-10-22 05:53:20 +01:00
win_state.c win_state: change license to LGPL 2017-06-17 21:10:24 +02:00
win_state.h x11: pseudo HiDPI scaling 2017-01-19 16:31:54 +01:00
x11_common.c input: merge mouse wheel and axis keycodes 2017-09-03 20:31:44 +10:00
x11_common.h Add checks for HAVE_GPL to various GPL-only source files 2017-10-10 15:51:16 +02:00