summaryrefslogtreecommitdiff
path: root/src/glsl/lower_variable_index_to_cond_assign.cpp
AgeCommit message (Collapse)Author
2011-01-31glsl: Introduce a new "const_in" variable mode.Kenneth Graunke
This annotation is for an "in" function parameter for which it is only legal to pass constant expressions. The only known example of this, currently, is the textureOffset functions. This should never be used for globals.
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke
2011-01-11glsl: Fix the lowering of variable array indexing to not lose write_masks.Eric Anholt
Fixes glsl-complex-subscript on 965.
2010-09-27glsl: Fix broadcast_index of lower_variable_index_to_cond_assign.Eric Anholt
It's trying to get an int smeared across all channels, not trying to get a 1:1 mapping of a subset of a vector's channels. This usually ended up not mattering with ir_to_mesa, since it just smears floats into every chan of a vec4. Fixes: glsl1-temp array with swizzled variable indexing
2010-09-18glsl: Fix 'control reaches end of non-void function' warning.Vinson Lee
Fixes this GCC warning. lower_variable_index_to_cond_assign.cpp: In member function 'bool variable_index_to_cond_assign_visitor::needs_lowering(ir_dereference_array*) const': lower_variable_index_to_cond_assign.cpp:261: warning: control reaches end of non-void function
2010-09-17glsl2: Add flags to enable variable index loweringIan Romanick
2010-09-17glsl2: Refactor testing for whether a deref is of a matrix or arrayIan Romanick
2010-09-17glsl: add pass to lower variable array indexing to conditional assignmentsLuca Barbieri
Currenly GLSL happily generates indirect addressing of any kind of arrays. Unfortunately DirectX 9 GPUs are not guaranteed to support any of them in general. This pass fixes that by lowering such constructs to a binary search on the values, followed at the end by vectorized generation of equality masks, and 4 conditional assignments for each mask generation. Note that this requires the ir_binop_equal change so that we can emit SEQ to generate the boolean masks. Unfortunately, ir_structure_splitting is too dumb to turn the resulting constant array references to individual variables, so this will need to be added too before this pass can actually be effective for temps. Several patches in the glsl2-lower-variable-indexing were squashed into this commit. These patches fix bugs in Luca's original implementation, and the individual patches can be seen in that branch. This was done to aid bisecting in the future. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>