diff options
author | Ilia Mirkin <[email protected]> | 2016-11-05 09:31:21 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-11-09 20:26:48 -0500 |
commit | 73f53c097a6bbd07572d5e46af4893d17ff8af93 (patch) | |
tree | c224c022da56f96956f2c898ece75d2fc66f0c2f /src/compiler/glsl/ir_optimization.h | |
parent | 885c78801785701fdca0217a7b0f992f26115ee4 (diff) |
glsl: record number of components used in each slot for varying packing
Instead of packing varyings into vec4's, keep track of how many
components each slot uses and create varyings with matching types. This
ensures that we don't end up using more components than the orginal
shader, which is especially important for geometry shader output limits.
This comes up for NVIDIA hw, where the limit is 1024 output components
for a GS, and the hardware complains *loudly* if you even think about
going over.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_optimization.h')
-rw-r--r-- | src/compiler/glsl/ir_optimization.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h index 6f2bc321fa7..8cee41843dc 100644 --- a/src/compiler/glsl/ir_optimization.h +++ b/src/compiler/glsl/ir_optimization.h @@ -136,7 +136,9 @@ void lower_shared_reference(struct gl_linked_shader *shader, void lower_ubo_reference(struct gl_linked_shader *shader, bool clamp_block_indices); void lower_packed_varyings(void *mem_ctx, - unsigned locations_used, ir_variable_mode mode, + unsigned locations_used, + const uint8_t *components, + ir_variable_mode mode, unsigned gs_input_vertices, gl_linked_shader *shader, bool disable_varying_packing, bool xfb_enabled); |