summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-20 18:45:14 -0600
committerBrian <[email protected]>2007-08-20 18:45:14 -0600
commit3772441c498b997947f68e98830f72649bbc8442 (patch)
tree35d306d7532bd4c038a3bfb44c614f0c122167ad /src/mesa/pipe/softpipe
parent79b8f97457a9634df28ba0def4623dbe2b142f09 (diff)
move ALIGN16-related macros into p_compiler.h
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rwxr-xr-xsrc/mesa/pipe/softpipe/sp_quad_fs.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index c2decfecf86..c20f09d3090 100755
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -40,15 +40,6 @@
#include "sp_tex_sample.h"
-#if defined __GNUC__
-#define USE_ALIGNED_ATTRIBS 1
-#define ALIGN16_SUFFIX __attribute__(( aligned( 16 ) ))
-#else
-#define USE_ALIGNED_ATTRIBS 0
-#define ALIGN16_SUFFIX
-#endif
-
-
struct quad_shade_stage
{
struct quad_stage stage;
@@ -77,13 +68,8 @@ shade_quad(
const float fy = (float) quad->y0;
struct tgsi_exec_machine machine;
-#if USE_ALIGNED_ATTRIBS
- struct tgsi_exec_vector inputs[PIPE_ATTRIB_MAX] ALIGN16_SUFFIX;
- struct tgsi_exec_vector outputs[PIPE_ATTRIB_MAX] ALIGN16_SUFFIX;
-#else
- struct tgsi_exec_vector inputs[PIPE_ATTRIB_MAX + 1];
- struct tgsi_exec_vector outputs[PIPE_ATTRIB_MAX + 1];
-#endif
+ ALIGN16_DECL(struct tgsi_exec_vector, inputs, PIPE_ATTRIB_MAX);
+ ALIGN16_DECL(struct tgsi_exec_vector, outputs, PIPE_ATTRIB_MAX);
#ifdef DEBUG
memset( &machine, 0, sizeof( machine ) );
@@ -99,13 +85,8 @@ shade_quad(
/* Consts does not require 16 byte alignment. */
machine.Consts = softpipe->fs.constants->constant;
-#if USE_ALIGNED_ATTRIBS
- machine.Inputs = inputs;
- machine.Outputs = outputs;
-#else
- machine.Inputs = (struct tgsi_exec_vector *) tgsi_align_128bit( inputs );
- machine.Outputs = (struct tgsi_exec_vector *) tgsi_align_128bit( outputs );
-#endif
+ machine.Inputs = ALIGN16_ASSIGN(inputs);
+ machine.Outputs = ALIGN16_ASSIGN(outputs);
machine.InterpCoefs = quad->coef;