aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/loop_analysis.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-04-10 16:16:02 -0700
committerJason Ekstrand <[email protected]>2015-04-22 18:10:40 -0700
commit8b900e74058dd48368511780a488ccb7a645c64f (patch)
tree44bb04335642a61cecf0824cd6e410474fa68a22 /src/glsl/loop_analysis.cpp
parent7e1d21edbff772f6dfc727e0e09788d87e00e0f5 (diff)
nir/types: Make glsl_get_length smarter
Previously, this function returned the number of elements for structures and arrays and 0 for everything else. In NIR, this is almost never what you want because we also treat matricies as arrays so you have to special-case constantly. This commit glsl_get_length treat matrices as an array of columns by returning the number of columns instead of 0 This also fixes a bug in locals_to_regs caused by not checking for the matrix case in one place. v2: Only special-case for matrices and return a length of 0 for vectors as we did before. This was needed to not break the TGSI-based drivers and doesn't really affect NIR at the moment. Reviewed-by: Connor Abbott <[email protected]> Tested-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/glsl/loop_analysis.cpp')
0 files changed, 0 insertions, 0 deletions