diff options
author | Paul Berry <[email protected]> | 2012-12-09 15:25:38 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-12-14 10:49:21 -0800 |
commit | 1745a4d751a4184771628ad2be1336439c831afb (patch) | |
tree | 765826df68889fd36b5c2fec92c6251e17d7d4a6 /src/glsl/ir_optimization.h | |
parent | f3993107f0b997195c4d97b95c47e84220f10b6d (diff) |
glsl: Add a lowering pass for packing varyings.
This lowering pass generates GLSL code that manually packs varyings
into vec4 slots, for the benefit of back-ends that don't support
packed varyings natively.
No functional change--the lowering pass is not yet used.
Reviewed-by: Eric Anholt <[email protected]>
v2: Don't use ir_hierarchical_visitor--just loop over instructions
directly. Also, make the names of the packed varyings include the
names of the original varyings that were packed into them.
Diffstat (limited to 'src/glsl/ir_optimization.h')
-rw-r--r-- | src/glsl/ir_optimization.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir_optimization.h b/src/glsl/ir_optimization.h index 628096e7cd2..6b9519174e5 100644 --- a/src/glsl/ir_optimization.h +++ b/src/glsl/ir_optimization.h @@ -75,6 +75,9 @@ bool lower_quadop_vector(exec_list *instructions, bool dont_lower_swz); bool lower_clip_distance(gl_shader *shader); void lower_output_reads(exec_list *instructions); void lower_ubo_reference(struct gl_shader *shader, exec_list *instructions); +void lower_packed_varyings(void *mem_ctx, unsigned location_base, + unsigned locations_used, ir_variable_mode mode, + gl_shader *shader); bool optimize_redundant_jumps(exec_list *instructions); bool optimize_split_arrays(exec_list *instructions, bool linked); |