summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_maos.c
diff options
context:
space:
mode:
authorNicolai Haehnle <[email protected]>2005-02-17 22:07:32 +0000
committerNicolai Haehnle <[email protected]>2005-02-17 22:07:32 +0000
commit6f37e76272a3a4b3898426b943304d1c5903d0ee (patch)
treec37b8083a87efc5bbdb225001e4cade9e8c67dbf /src/mesa/drivers/dri/r300/r300_maos.c
parent74477b24a8faef4ce0870b4a68270e586d107ff7 (diff)
Fixing *lots* of warning messages, especially concerning unportable
whitespace before preprocessor commands. Please, can you try to keep the warnings down? Try running make with make -s sometime to see just how bad an offender the current code is.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_maos.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index 20a804d97a8..af5d00892a2 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -221,41 +221,41 @@ void emit_elts(GLcontext * ctx, GLuint *elts,
int dec_found=0;
unsigned long *dst;
unsigned long magic_tbl2[6]= { 0x3f51eb85, 0x3e99999a, 0x3f1eb852, 0x3e6b851f, 0x3f2b851f, 0x3eb33333 };
-
+
if(n_elts == 1){
fprintf(stderr, "Dont know how to handle this\n");
exit(-1);
}
-
+
hw_elts=malloc(n_fake_elts*sizeof(unsigned short int));
-
+
for(i=0; i < n_elts; i++)
hw_elts[i]=(unsigned short int)elts[i];
-
+
/* Work around magic_1 problem by filling rest of the data with last idx */
for(; i < n_fake_elts; i++)
hw_elts[i]=(unsigned short int)elts[n_elts-1];
-
+
dst=rsp->gartTextures.map;
-
+
/* Buffer underrun in fgl causes these patterns to appear.
Filling these shouldnt be needed in real life. */
for(i=0; i < align; i++)
if(dst[i] = magic_tbl2[6-align+i])
-
+
//memset(dst, 0, align*sizeof(unsigned long));
/*for(i=0; i < align; i++)
dst[i]=rand()%(~0);*/
-
+
dst=&dst[align];
-
+
memcpy(dst, hw_elts, n_fake_elts*sizeof(unsigned short int));
dst=((char *)dst)+n_fake_elts*sizeof(unsigned short int);
-
+
/*for(i=0; i < 1024/4; i++)
dst[i]=rand()%(~0);*/
//memset(dst, 0, 1024);
-
+
//memset(((char *)rsp->gartTextures.map)+ec*sizeof(unsigned short int), 0, 1024);
/*emit_vector(ctx, &rmesa->state.elt_ao,
(char *)hw_elts,
@@ -269,15 +269,15 @@ void emit_elts(GLcontext * ctx, GLuint *elts,
inc_found=0;
break;
}
-
+
dec_found=1;
for(i=1; i < oec; i++)
if(hw_elts[i-1] != hw_elts[i]-1){
dec_found=0;
}
-
+
fprintf(stderr, "elts:");
-
+
if(inc_found==0 && dec_found==0){
fprintf(stderr, "error found\n");
exit(-1);
@@ -287,7 +287,7 @@ void emit_elts(GLcontext * ctx, GLuint *elts,
fprintf(stderr, "%d ", hw_elts[i]);
fprintf(stderr, "\n");*/
}
-
+
/* Emit vertex data to GART memory (unless immediate mode)
* Route inputs to the vertex processor
*/
@@ -475,12 +475,12 @@ drm_radeon_cmd_header_t *cmd = NULL;
/* Mesa assumes that all missing components are from (0, 0, 0, 1) */
- #define ALL_COMPONENTS ((R300_INPUT_ROUTE_SELECT_X<<R300_INPUT_ROUTE_X_SHIFT) \
+#define ALL_COMPONENTS ((R300_INPUT_ROUTE_SELECT_X<<R300_INPUT_ROUTE_X_SHIFT) \
| (R300_INPUT_ROUTE_SELECT_Y<<R300_INPUT_ROUTE_Y_SHIFT) \
| (R300_INPUT_ROUTE_SELECT_Z<<R300_INPUT_ROUTE_Z_SHIFT) \
| (R300_INPUT_ROUTE_SELECT_W<<R300_INPUT_ROUTE_W_SHIFT))
- #define ALL_DEFAULT ((R300_INPUT_ROUTE_SELECT_ZERO<<R300_INPUT_ROUTE_X_SHIFT) \
+#define ALL_DEFAULT ((R300_INPUT_ROUTE_SELECT_ZERO<<R300_INPUT_ROUTE_X_SHIFT) \
| (R300_INPUT_ROUTE_SELECT_ZERO<<R300_INPUT_ROUTE_Y_SHIFT) \
| (R300_INPUT_ROUTE_SELECT_ZERO<<R300_INPUT_ROUTE_Z_SHIFT) \
| (R300_INPUT_ROUTE_SELECT_ONE<<R300_INPUT_ROUTE_W_SHIFT))
@@ -524,13 +524,13 @@ drm_radeon_cmd_header_t *cmd = NULL;
#if 0
r300->hw.vic.cmd[R300_VIC_CNTL_1]=0;
-
+
if(r300->state.render_inputs & _TNL_BIT_POS)
r300->hw.vic.cmd[R300_VIC_CNTL_1]|=R300_INPUT_CNTL_POS;
-
+
if(r300->state.render_inputs & _TNL_BIT_NORMAL)
r300->hw.vic.cmd[R300_VIC_CNTL_1]|=R300_INPUT_CNTL_NORMAL;
-
+
if(r300->state.render_inputs & _TNL_BIT_COLOR0)
r300->hw.vic.cmd[R300_VIC_CNTL_1]|=R300_INPUT_CNTL_COLOR;