diff options
author | Niklas Haas <git@haasn.xyz> | 2017-09-13 03:09:48 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-09-26 17:25:35 +0200 |
commit | 258487370fd840b018a404225277d74f74899c59 (patch) | |
tree | 83a9a112d141f08a87d290ddf0aa57ea04fbf60a /wscript_build.py | |
parent | 91f23c7067af248846420854a0dc78c26ea6e300 (diff) | |
download | mpv-258487370fd840b018a404225277d74f74899c59.tar.bz2 mpv-258487370fd840b018a404225277d74f74899c59.tar.xz |
vo_gpu: vulkan: generalize SPIR-V compiler
In addition to the built-in nvidia compiler, we now also support a
backend based on libshaderc. shaderc is sort of like glslang except it
has a C API and is available as a dynamic library.
The generated SPIR-V is now cached alongside the VkPipeline in the
cached_program. We use a special cache header to ensure validity of this
cache before passing it blindly to the vulkan implementation, since
passing invalid SPIR-V can cause all sorts of nasty things. It's also
designed to self-invalidate if the compiler gets better, by offering a
catch-all `int compiler_version` that implementations can use as a cache
invalidation marker.
Diffstat (limited to 'wscript_build.py')
-rw-r--r-- | wscript_build.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py index 86b51daaa2..9fd3280836 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -390,6 +390,8 @@ def build(ctx): ( "video/out/gpu/lcms.c" ), ( "video/out/gpu/osd.c" ), ( "video/out/gpu/ra.c" ), + ( "video/out/gpu/spirv.c" ), + ( "video/out/gpu/spirv_shaderc.c", "shaderc" ), ( "video/out/gpu/shader_cache.c" ), ( "video/out/gpu/user_shaders.c" ), ( "video/out/gpu/utils.c" ), @@ -451,6 +453,7 @@ def build(ctx): ( "video/out/vulkan/ra_vk.c", "vulkan" ), ( "video/out/vulkan/context.c", "vulkan" ), ( "video/out/vulkan/context_xlib.c", "vulkan && x11" ), + ( "video/out/vulkan/spirv_nvidia.c", "vulkan" ), ( "video/out/win32/exclusive_hack.c", "gl-win32" ), ( "video/out/wayland_common.c", "wayland" ), ( "video/out/wayland/buffer.c", "wayland" ), |