diff options
author | Timothy Arceri <[email protected]> | 2016-06-09 13:43:23 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-06-12 21:56:28 +1000 |
commit | ad3def919e8bdb4f01db0f06d54961175a1910c4 (patch) | |
tree | 6e4677fe46374bc9e7f6d2202cda2c883d35195a /src/compiler/glsl/link_varyings.h | |
parent | 0fb85ac08d61d365e67c8f79d6955e9f89543560 (diff) |
glsl: fix max varyings count for ARB_enhanced_layouts
Since this extension allows more than one varying to share a single
location we can't just count the number of slots a varying takes and
add it to the total.
Instead we now reuse the reserved varyings bitfield to determine how
many slots are reserved for explicit locations instead.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/link_varyings.h')
-rw-r--r-- | src/compiler/glsl/link_varyings.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/compiler/glsl/link_varyings.h b/src/compiler/glsl/link_varyings.h index 2126a5c6d98..39e907039a6 100644 --- a/src/compiler/glsl/link_varyings.h +++ b/src/compiler/glsl/link_varyings.h @@ -320,16 +320,22 @@ assign_varying_locations(struct gl_context *ctx, struct gl_shader_program *prog, gl_shader *producer, gl_shader *consumer, unsigned num_tfeedback_decls, - tfeedback_decl *tfeedback_decls); + tfeedback_decl *tfeedback_decls, + const uint64_t reserved_slots); + +uint64_t +reserved_varying_slot(struct gl_shader *stage, ir_variable_mode io_mode); bool check_against_output_limit(struct gl_context *ctx, struct gl_shader_program *prog, - gl_shader *producer); + gl_shader *producer, + unsigned num_explicit_locations); bool check_against_input_limit(struct gl_context *ctx, struct gl_shader_program *prog, - gl_shader *consumer); + gl_shader *consumer, + unsigned num_explicit_locations); #endif /* GLSL_LINK_VARYINGS_H */ |