aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pack.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-18 17:17:28 -0700
committerEric Anholt <[email protected]>2011-10-24 13:43:02 -0700
commitcc4ddc3a1e4bbe5fccd03b39b3590368be8c172f (patch)
tree91efafd1cb0fa971bf21a87849238b5837995665 /src/mesa/main/pack.c
parent2ecfa88548c6b3135101ae9b5a2ae83b1cef8784 (diff)
glsl: Fix gl_NormalMatrix swizzle setup to match i965's invariants.
A driver trying to set up builtin uniforms is faced with a problem: How do I walk the ir_variable structure (representing an array of structs, or array of matrices, or struct, or whatever), and set up driver structures so that dereference of that uniform gets the corresponding ParameterValues[] entry. The rule in general is that each corresponding vector-sized field of an array of structs is one builtin uniform state slot. i965 relied on another invariant: each state slot has a number of unique channel swizzles corresponding to the number of elements in the field's vector, to avoid needing to walk the glsl_type in parallel to get at vector_elements. All of the builtin uniforms followed this behavior, except for gl_NormalMatrix. That's a mat3 (so 3 vec3s), but it was swizzled as 3 vec4s. Fixes piglit glsl-fs-normalmatrix. Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/main/pack.c')
0 files changed, 0 insertions, 0 deletions