Dont let (possibly) undefined z component reach hw as its unused
authorAapo Tahkola <aet@rasterburn.org>
Tue, 28 Feb 2006 23:22:48 +0000 (23:22 +0000)
committerAapo Tahkola <aet@rasterburn.org>
Tue, 28 Feb 2006 23:22:48 +0000 (23:22 +0000)
src/mesa/drivers/dri/r300/r300_vertexprog.c

index 60d580a5f2aca4fe546f675e985828a5f28758cb..85116c9e10c54ddd654acb161af7ae6beecb56e5 100644 (file)
@@ -775,21 +775,21 @@ void translate_vertex_shader(struct r300_vertex_program *vp)
                        o_inst->src1=MAKE_VSF_SOURCE(t_src_index(vp, &src[0]),
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 0)), // x
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 3)), // w
-                                       t_swizzle(GET_SWZ(src[0].Swizzle, 2)), // z
+                                       VSF_IN_COMPONENT_ZERO, // z
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 1)), // y
                                        t_src_class(src[0].File),
                                        src[0].NegateBase ? VSF_FLAG_ALL : VSF_FLAG_NONE);
                        o_inst->src2=MAKE_VSF_SOURCE(t_src_index(vp, &src[0]),
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 1)), // y
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 3)), // w
-                                       t_swizzle(GET_SWZ(src[0].Swizzle, 2)), // z
+                                       VSF_IN_COMPONENT_ZERO, // z
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 0)), // x
                                        t_src_class(src[0].File),
                                        src[0].NegateBase ? VSF_FLAG_ALL : VSF_FLAG_NONE);
                        o_inst->src3=MAKE_VSF_SOURCE(t_src_index(vp, &src[0]),
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 1)), // y
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 0)), // x
-                                       t_swizzle(GET_SWZ(src[0].Swizzle, 2)), // z
+                                       VSF_IN_COMPONENT_ZERO, // z
                                        t_swizzle(GET_SWZ(src[0].Swizzle, 3)), // w
                                        t_src_class(src[0].File),
                                        src[0].NegateBase ? VSF_FLAG_ALL : VSF_FLAG_NONE);