summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2007-05-09 03:32:15 +0000
committerOliver McFadden <[email protected]>2007-05-09 03:32:15 +0000
commit28b47110b617c137ba18b9273c6172135a99b29d (patch)
treefb5f62a876fef21d9ff5d8220f53e9ae9b909cf3 /src/mesa/drivers/dri
parentfe2c58d2d520d49bbf4c922885ae4f0bf27fcde9 (diff)
r300: Converted exit calls to _mesa_exit calls.
Note that the exit codes are inconsistent and should be fixed.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h4
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c18
-rw-r--r--src/mesa/drivers/dri/r300/r300_texmem.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c18
7 files changed, 26 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index dbb38bf3acd..9bfdc85c4ab 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -122,7 +122,7 @@ int r300FlushCmdBuf(r300ContextPtr r300, const char *caller)
if (ret) {
fprintf(stderr, "drmRadeonCmdBuffer: %d (exiting)\n", ret);
- exit(ret);
+ _mesa_exit(ret);
}
return ret;
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index 90c2b8c1419..e616986c08f 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -160,7 +160,7 @@ static __inline__ uint32_t cmdpacify(void)
"cmd_written=%d cmd_reserved=%d\n", \
__FILE__, __FUNCTION__, __LINE__, \
cmd_written, cmd_reserved); \
- exit(-1); \
+ _mesa_exit(-1); \
} \
} while(0)
@@ -195,7 +195,7 @@ static __inline__ uint32_t cmdpacify(void)
fprintf(stderr,"Too big packet3 %08x: cannot " \
"store %d dwords\n", \
_p, _n); \
- exit(-1); \
+ _mesa_exit(-1); \
} \
cmd[0].i = cmdpacket3(R300_CMD_PACKET3_RAW); \
cmd[1].i = _p | ((_n & 0x3fff)<<16); \
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
index de0a482eb5d..05fe5e2c904 100644
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ b/src/mesa/drivers/dri/r300/r300_ioctl.c
@@ -465,7 +465,7 @@ static void r300RefillCurrentDmaRegion(r300ContextPtr rmesa, int size)
if (dmabuf->id == 0) {
fprintf(stderr,
"Error: Could not get dma buffer... exiting\n");
- exit(-1);
+ _mesa_exit(-1);
}
}
@@ -591,7 +591,7 @@ static void r300RefillCurrentDmaRegion(r300ContextPtr rmesa)
UNLOCK_HARDWARE(&rmesa->radeon);
fprintf(stderr,
"Error: Could not get dma buffer... exiting\n");
- exit(-1);
+ _mesa_exit(-1);
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index c424e7a31a9..94b1f65f263 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -217,7 +217,7 @@ static void emit_vector(GLcontext * ctx,
break;
default:
assert(0);
- exit(1);
+ _mesa_exit(1);
break;
}
@@ -243,7 +243,7 @@ void r300EmitElts(GLcontext * ctx, void *elts, unsigned long n_elts,
return;
} else if (r300IsGartMemory(rmesa, elts, 1)) {
WARN_ONCE("Pointer not within GART memory!\n");
- exit(1);
+ _mesa_exit(1);
}
r300AllocDmaRegion(rmesa, rvb, n_elts * elt_size, elt_size);
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 75d606fdcc4..fbdb4ca98f4 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1330,7 +1330,7 @@ void r300_setup_textures(GLcontext * ctx)
fprintf(stderr,
"Aiiee ! mtu=%d is greater than R300_MAX_TEXTURE_UNITS=%d\n",
mtu, R300_MAX_TEXTURE_UNITS);
- exit(-1);
+ _mesa_exit(-1);
}
/* We cannot let disabled tmu offsets pass DRM */
@@ -1514,7 +1514,7 @@ void r300_setup_rs_unit(GLcontext * ctx)
if (i == ctx->Const.MaxTextureUnits) {
fprintf(stderr, "\tno free texcoord found...\n");
- exit(0);
+ _mesa_exit(0);
}
InputsRead |= (FRAG_BIT_TEX0 << i);
@@ -1542,7 +1542,7 @@ void r300_setup_rs_unit(GLcontext * ctx)
("fragprog wants coords for tex%d, vp doesn't provide them!\n",
i);
//_mesa_print_program(&CURRENT_VERTEX_SHADER(ctx)->Base);
- //exit(-1);
+ //_mesa_exit(-1);
}
InputsRead &= ~(FRAG_BIT_TEX0 << i);
fp_reg++;
@@ -1562,7 +1562,7 @@ void r300_setup_rs_unit(GLcontext * ctx)
("fragprog wants col0, vp doesn't provide it\n");
goto out; /* FIXME */
//_mesa_print_program(&CURRENT_VERTEX_SHADER(ctx)->Base);
- //exit(-1);
+ //_mesa_exit(-1);
}
r300->hw.rr.cmd[R300_RR_ROUTE_0] |= 0
@@ -1579,7 +1579,7 @@ void r300_setup_rs_unit(GLcontext * ctx)
_TNL_ATTRIB_COLOR1)) {
WARN_ONCE
("fragprog wants col1, vp doesn't provide it\n");
- //exit(-1);
+ //_mesa_exit(-1);
}
r300->hw.rr.cmd[R300_RR_ROUTE_1] |=
@@ -1637,7 +1637,7 @@ void static inline setup_vertex_shader_fragment(r300ContextPtr r300,
if (vsf->length & 0x3) {
fprintf(stderr,
"VERTEX_SHADER_FRAGMENT must have length divisible by 4\n");
- exit(-1);
+ _mesa_exit(-1);
}
switch ((dest >> 8) & 0xf) {
@@ -1672,7 +1672,7 @@ void static inline setup_vertex_shader_fragment(r300ContextPtr r300,
fprintf(stderr,
"%s:%s don't know how to handle dest %04x\n",
__FILE__, __FUNCTION__, dest);
- exit(-1);
+ _mesa_exit(-1);
}
}
@@ -2277,7 +2277,7 @@ void r300ResetHwState(r300ContextPtr r300)
default:
fprintf(stderr, "Error: Unsupported depth %d... exiting\n",
ctx->Visual.depthBits);
- exit(-1);
+ _mesa_exit(-1);
}
/* z compress? */
@@ -2347,7 +2347,7 @@ void r300InitState(r300ContextPtr r300)
default:
fprintf(stderr, "Error: Unsupported depth %d... exiting\n",
ctx->Visual.depthBits);
- exit(-1);
+ _mesa_exit(-1);
}
/* Only have hw stencil when depth buffer is 24 bits deep */
diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c
index c527677cd0c..4750c468db4 100644
--- a/src/mesa/drivers/dri/r300/r300_texmem.c
+++ b/src/mesa/drivers/dri/r300/r300_texmem.c
@@ -485,7 +485,7 @@ static void uploadSubImage( r300ContextPtr rmesa, r300TexObjPtr t,
fprintf( stderr, " blit width=%d height=%d data=%p\n",
t->image[face][hwlevel].width, t->image[face][hwlevel].height,
t->image[face][hwlevel].data );
- exit( 1 );
+ _mesa_exit( 1 );
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 6e023ef2ffa..c7bfd8e8a81 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -121,7 +121,7 @@ int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program_cont *
if(mesa_vp->Base.Parameters->NumParameters * 4 > VSF_MAX_FRAGMENT_LENGTH){
fprintf(stderr, "%s:Params exhausted\n", __FUNCTION__);
- exit(-1);
+ _mesa_exit(-1);
}
paramList = mesa_vp->Base.Parameters;
@@ -173,7 +173,7 @@ static unsigned long t_dst_class(enum register_file file)
*/
default:
fprintf(stderr, "problem in %s", __FUNCTION__);
- exit(0);
+ _mesa_exit(0);
}
}
@@ -207,7 +207,7 @@ static unsigned long t_src_class(enum register_file file)
*/
default:
fprintf(stderr, "problem in %s", __FUNCTION__);
- exit(0);
+ _mesa_exit(0);
}
}
@@ -311,7 +311,7 @@ static unsigned long t_opcode(enum prog_opcode opcode)
default:
fprintf(stderr, "%s: Should not be called with opcode %d!", __FUNCTION__, opcode);
}
- exit(-1);
+ _mesa_exit(-1);
return 0;
}
@@ -325,7 +325,7 @@ static unsigned long op_operands(enum prog_opcode opcode)
return op_names[i].ip;
fprintf(stderr, "op %d not found in op_names\n", opcode);
- exit(-1);
+ _mesa_exit(-1);
return 0;
}
@@ -796,7 +796,7 @@ static void r300_translate_vertex_shader(struct r300_vertex_program *vp, struct
case OPCODE_RCC:
fprintf(stderr, "Dont know how to handle op %d yet\n", vpi->Opcode);
- exit(-1);
+ _mesa_exit(-1);
break;
case OPCODE_END:
break;
@@ -829,7 +829,7 @@ static void r300_translate_vertex_shader(struct r300_vertex_program *vp, struct
default:
fprintf(stderr, "scalars and op RCC not handled yet");
- exit(-1);
+ _mesa_exit(-1);
break;
}
}else{
@@ -854,7 +854,7 @@ static void r300_translate_vertex_shader(struct r300_vertex_program *vp, struct
default:
fprintf(stderr, "scalars and op RCC not handled yet");
- exit(-1);
+ _mesa_exit(-1);
break;
}
}
@@ -1080,7 +1080,7 @@ void r300_select_vertex_shader(r300ContextPtr r300)
if(i == ctx->Const.MaxTextureUnits){
fprintf(stderr, "\tno free texcoord found\n");
- exit(0);
+ _mesa_exit(0);
}
InputsRead |= (FRAG_BIT_TEX0 << i);