summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-29 00:41:50 +0200
committerNiklas Haas <git@haasn.xyz>2017-09-29 00:41:50 +0200
commit22311a767d863633d29f136385d4eef4fad8fde8 (patch)
tree644f6ef33ee6ef4c2d774def339f4b4eeb1140da
parent07fa5c8a8f4b070db2c31ae05daaaa57615c4b66 (diff)
downloadmpv-22311a767d863633d29f136385d4eef4fad8fde8.tar.bz2
mpv-22311a767d863633d29f136385d4eef4fad8fde8.tar.xz
vo_gpu: force layout std430 for PCs
Seems to be fixed upstream in the nvidia driver, so it's probably a good idea to 1. force the layout and 2. remove the warning, as it now actually works. Users with older drivers would run into errors, but they can still use shaderc as a replacement. (And it's not like the old status quo was any better)
-rw-r--r--DOCS/man/options.rst4
-rw-r--r--video/out/gpu/shader_cache.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 8d61861177..75539917f1 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -4211,9 +4211,7 @@ The following video options are currently all specific to ``--vo=gpu`` and
nvidia
Use nvidia's built-in compiler. Only works for nvidia GPUs. Can be
buggy, but also supports some features glslang does not. Only works
- with vulkan. WARNING: Pretty buggy, handles push constants incorrectly
- (this causes graphical corruption with e.g. ``--temporal-dither``)! Use
- only for testing.
+ with vulkan.
``--glsl-shaders=<file-list>``
Custom GLSL hooks. These are a flexible way to add custom fragment shaders,
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c
index 0aeac8c844..c3eccac9e9 100644
--- a/video/out/gpu/shader_cache.c
+++ b/video/out/gpu/shader_cache.c
@@ -674,7 +674,7 @@ static void add_uniforms(struct gl_shader_cache *sc, bstr *dst)
// Ditto for push constants
if (sc->pushc_size > 0) {
- ADD(dst, "layout(push_constant) uniform PushC {\n");
+ ADD(dst, "layout(std430, push_constant) uniform PushC {\n");
for (int n = 0; n < sc->num_uniforms; n++) {
struct sc_uniform *u = &sc->uniforms[n];
if (u->type != SC_UNIFORM_TYPE_PUSHC)