diff options
author | Niklas Haas <git@haasn.xyz> | 2018-11-24 04:25:30 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-12-01 15:50:23 +0200 |
commit | 5bcac8580df6fc62323136f756a3a6d1e754fe9c (patch) | |
tree | 523664b7c0cc396e75b18f1c396bed544accfb01 /video/out/vulkan | |
parent | f0509d3738ec37cfa4afa81f070c8abd876e6561 (diff) | |
download | mpv-5bcac8580df6fc62323136f756a3a6d1e754fe9c.tar.bz2 mpv-5bcac8580df6fc62323136f756a3a6d1e754fe9c.tar.xz |
spirv: remove --spirv-compiler=nvidia
This option has been deprecated upstream for a long time, probably
doesn't even work anymore, and won't work moving forwards as we replace
the vulkan code by libplacebo wrappers.
I haven't removed the option completely yet since in theory we could
still add support for e.g. a native glslang wrapper in the future. But
most likely the future of this code is deletion.
As an aside, fix an issue where the man page didn't mention d3d11.
Diffstat (limited to 'video/out/vulkan')
-rw-r--r-- | video/out/vulkan/spirv_nvidia.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/video/out/vulkan/spirv_nvidia.c b/video/out/vulkan/spirv_nvidia.c deleted file mode 100644 index 6cc43a5619..0000000000 --- a/video/out/vulkan/spirv_nvidia.c +++ /dev/null @@ -1,54 +0,0 @@ -#include "video/out/gpu/spirv.h" - -#include "common.h" -#include "context.h" -#include "utils.h" - -static bool nv_glsl_compile(struct spirv_compiler *spirv, void *tactx, - enum glsl_shader type, const char *glsl, - struct bstr *out_spirv) -{ - // The nvidia extension literally assumes your SPIRV is in fact valid GLSL - *out_spirv = bstr0(glsl); - return true; -} - -static bool nv_glsl_init(struct ra_ctx *ctx) -{ - struct mpvk_ctx *vk = ra_vk_ctx_get(ctx); - if (!vk) - return false; - - struct spirv_compiler *spv = ctx->spirv; - spv->required_ext = VK_NV_GLSL_SHADER_EXTENSION_NAME; - spv->glsl_version = 450; // impossible to query, so hard-code it.. - spv->ra_caps = RA_CAP_NESTED_ARRAY; - - // Make sure the extension is actually available, and fail gracefully - // if it isn't - VkExtensionProperties *props = NULL; - uint32_t extnum = 0; - VK(vkEnumerateDeviceExtensionProperties(vk->physd, NULL, &extnum, NULL)); - props = talloc_array(NULL, VkExtensionProperties, extnum); - VK(vkEnumerateDeviceExtensionProperties(vk->physd, NULL, &extnum, props)); - - bool ret = true; - for (int e = 0; e < extnum; e++) { - if (strncmp(props[e].extensionName, spv->required_ext, - VK_MAX_EXTENSION_NAME_SIZE) == 0) - goto done; - } - -error: - MP_VERBOSE(ctx, "Device doesn't support VK_NV_glsl_shader, skipping..\n"); - ret = false; - -done: - talloc_free(props); - return ret; -} - -const struct spirv_compiler_fns spirv_nvidia_builtin = { - .compile_glsl = nv_glsl_compile, - .init = nv_glsl_init, -}; |