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 <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user