Use fp_attr_to_slot[].
authormichal <michal@michal-laptop.(none)>
Mon, 6 Aug 2007 16:04:34 +0000 (17:04 +0100)
committermichal <michal@michal-laptop.(none)>
Mon, 6 Aug 2007 16:04:34 +0000 (17:04 +0100)
src/mesa/pipe/softpipe/sp_quad_fs.c

index 1676d47d51b6a1eea696aa5db25b87843a24e1e0..66513bb436957315b3629853cedb08f7e4f7a834 100644 (file)
 #include "sp_quad.h"
 #include "tgsi/core/tgsi_core.h"
 
+#if 0
 #if defined __GNUC__
 #define ALIGNED_ATTRIBS 1
 #else
 #define ALIGNED_ATTRIBS 0
 #endif
+#else
+#define ALIGNED_ATTRIBS 0
+#endif
 
 struct exec_machine {
    const struct setup_coefficient *coef; /**< will point to quad->coef */
@@ -229,6 +233,7 @@ shade_quad( struct quad_stage *qs, struct quad_header *quad )
 
       /* load input registers */
       for (i = 0; i < softpipe->nr_attrs; i++) {
+#if 0
          /* Make sure fp_attr_to_slot[] is an identity transform. */
          assert( softpipe->fp_attr_to_slot[i] == i );
 
@@ -236,6 +241,12 @@ shade_quad( struct quad_stage *qs, struct quad_header *quad )
             &ainputs[i],
             exec.attr[i],
             sizeof( ainputs[0] ) );
+#else
+         memcpy(
+            &ainputs[i],
+            exec.attr[softpipe->fp_attr_to_slot[i]],
+            sizeof( ainputs[0] ) );
+#endif
       }
 #endif