diff options
author | Eric Anholt <[email protected]> | 2010-09-30 13:40:22 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-09-30 13:45:42 -0700 |
commit | a7cddd7de3123eb13e68c35aa111ff4060669f59 (patch) | |
tree | 0384c180014b15e3b723f563f7362d805f5373d1 /src/mesa/main/uniforms.c | |
parent | 6f6542a483ec726538f8a4555bddaeb0be6b2146 (diff) |
mesa: Don't reference a W component in setting up a vec3 uniform component.
The 965 driver would try to set up storage for the W component, and
the offsets would get mixed up.
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r-- | src/mesa/main/uniforms.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 29a9be8c996..87ce6e49388 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -122,7 +122,11 @@ static struct gl_builtin_uniform_element gl_LightSource_elements[] = { {"specular", {STATE_LIGHT, 0, STATE_SPECULAR}, SWIZZLE_XYZW}, {"position", {STATE_LIGHT, 0, STATE_POSITION}, SWIZZLE_XYZW}, {"halfVector", {STATE_LIGHT, 0, STATE_HALF_VECTOR}, SWIZZLE_XYZW}, - {"spotDirection", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION}, SWIZZLE_XYZW}, + {"spotDirection", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION}, + MAKE_SWIZZLE4(SWIZZLE_X, + SWIZZLE_Y, + SWIZZLE_Z, + SWIZZLE_Z)}, {"spotCosCutoff", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION}, SWIZZLE_WWWW}, {"spotCutoff", {STATE_LIGHT, 0, STATE_SPOT_CUTOFF}, SWIZZLE_XXXX}, {"spotExponent", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_WWWW}, |