diff options
author | Paul Berry <[email protected]> | 2013-04-10 06:48:42 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-08-01 20:22:59 -0700 |
commit | 3b0cf7027daebb8bea6af35d8d2ad4ed19fa7b5a (patch) | |
tree | d641b266ae5b24fb4b6a8584d24cf092191491b7 /src/glsl/linker.cpp | |
parent | 40d469f9ac45dfb825364af7a0436346c13502d6 (diff) |
glsl/linker: Properly pack GS input varyings.
Since geometry shader inputs are arrays (where the array index
indicates which vertex is being examined), varying packing needs to
treat them differently.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index f25dca2109d..4e77a9618c0 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1904,7 +1904,8 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) */ if (!assign_varying_locations(ctx, mem_ctx, prog, sh, NULL, - num_tfeedback_decls, tfeedback_decls)) + num_tfeedback_decls, tfeedback_decls, + 0)) goto done; } @@ -1939,10 +1940,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) gl_shader *const sh_i = prog->_LinkedShaders[i]; gl_shader *const sh_next = prog->_LinkedShaders[next]; + unsigned gs_input_vertices = + next == MESA_SHADER_GEOMETRY ? prog->Geom.VerticesIn : 0; if (!assign_varying_locations(ctx, mem_ctx, prog, sh_i, sh_next, next == MESA_SHADER_FRAGMENT ? num_tfeedback_decls : 0, - tfeedback_decls)) + tfeedback_decls, gs_input_vertices)) goto done; do_dead_builtin_varyings(ctx, sh_i->ir, sh_next->ir, |