silence misc warnings

This commit is contained in:
Brian Paul
2005-09-03 16:39:57 +00:00
parent 624ad14a58
commit 7fa6c1afb9
5 changed files with 23 additions and 16 deletions
+1 -4
View File
@@ -112,9 +112,6 @@ int r300FlushCmdBufLocked(r300ContextPtr r300, const char* caller)
int r300FlushCmdBuf(r300ContextPtr r300, const char* caller)
{
int ret;
int i;
drm_radeon_cmd_buffer_t cmd;
int start;
LOCK_HARDWARE(&r300->radeon);
@@ -273,7 +270,7 @@ CHECK( vpu, vpu_count(atom->cmd) ? (1 + vpu_count(atom->cmd)*4) : 0 )
*/
void r300InitCmdBuf(r300ContextPtr r300)
{
int size, i, mtu;
int size, mtu;
r300->hw.max_state_size = 2; /* reserve extra space for WAIT_IDLE */
+16 -9
View File
@@ -11,8 +11,10 @@
static void r300BindProgram(GLcontext *ctx, GLenum target, struct program *prog)
{
/*
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct r300_vertex_program *vp=(void *)prog;
*/
switch(target){
case GL_VERTEX_PROGRAM_ARB:
@@ -40,24 +42,29 @@ static struct program *r300NewProgram(GLcontext *ctx, GLenum target, GLuint id)
switch(target){
case GL_VERTEX_PROGRAM_ARB:
vp=CALLOC_STRUCT(r300_vertex_program);
return _mesa_init_vertex_program(ctx, &vp->mesa_program, target, id);
return _mesa_init_vertex_program(ctx, &vp->mesa_program, target, id);
case GL_FRAGMENT_PROGRAM_ARB:
#if USE_ARB_F_P == 1
fp=CALLOC_STRUCT(r300_fragment_program);
fp->ctx = ctx;
return _mesa_init_fragment_program(ctx, &fp->mesa_program, target, id);
return _mesa_init_fragment_program(ctx, &fp->mesa_program, target, id);
#else
fp=CALLOC_STRUCT(fragment_program);
return _mesa_init_fragment_program(ctx, fp, target, id);
return _mesa_init_fragment_program(ctx, fp, target, id);
#endif
case GL_FRAGMENT_PROGRAM_NV:
#if USE_ARB_F_P == 1
fp=CALLOC_STRUCT(r300_fragment_program);
return _mesa_init_fragment_program(ctx, &fp->mesa_program, target, id);
#else
fp=CALLOC_STRUCT(fragment_program);
return _mesa_init_fragment_program(ctx, fp, target, id);
return _mesa_init_fragment_program(ctx, fp, target, id);
#endif
case GL_FRAGMENT_SHADER_ATI:
afs=CALLOC_STRUCT(ati_fragment_shader);
return _mesa_init_ati_fragment_shader(ctx, afs, target, id);
return _mesa_init_ati_fragment_shader(ctx, afs, target, id);
default:
_mesa_problem(ctx, "Bad target in r300NewProgram");
}
return NULL;
@@ -75,9 +82,9 @@ static void r300DeleteProgram(GLcontext *ctx, struct program *prog)
static void r300ProgramStringNotify(GLcontext *ctx, GLenum target,
struct program *prog)
{
struct r300_vertex_program *vp=(void *)prog;
/*struct r300_vertex_program *vp=(void *)prog;*/
#if USE_ARB_F_P == 1
struct r300_fragment_program *fp=(void *)prog;
struct r300_fragment_program *fp = (struct r300_fragment_program *) prog;
#endif
switch(target) {
+4 -2
View File
@@ -1035,9 +1035,9 @@ static GLboolean r300_validate_texgen(GLcontext * ctx, GLuint unit)
static void disable_tex(GLcontext * ctx, int unit)
{
#if 0 /* This needs to be redone.. or done elsewhere */
r300ContextPtr rmesa = R300_CONTEXT(ctx);
#if 0 /* This needs to be redone.. or done elsewhere */
if (rmesa->hw.ctx.cmd[CTX_PP_CNTL] & (R200_TEX_0_ENABLE << unit)) {
/* Texture unit disabled */
if (rmesa->state.texture.unit[unit].texobj != NULL) {
@@ -1339,10 +1339,12 @@ static GLboolean r300UpdateTextureUnit(GLcontext * ctx, int unit)
void r300UpdateTextureState(GLcontext * ctx)
{
#if 0
r300ContextPtr rmesa = R300_CONTEXT(ctx);
GLboolean ok;
GLuint dbg;
int i;
#endif
GLboolean ok;
ok = (r300UpdateTextureUnit(ctx, 0) &&
r300UpdateTextureUnit(ctx, 1) &&
@@ -746,6 +746,7 @@ static GLboolean radeonCreateContext(const __GLcontextModes * glVisual,
else
return r200CreateContext(glVisual, driContextPriv, sharedContextPriv);
#endif
return GL_FALSE;
}
+1 -1
View File
@@ -93,7 +93,7 @@ typedef struct {
drmBufMapPtr buffers;
__volatile__ int32_t *scratch;
__volatile__ uint32_t *scratch;
__DRIscreenPrivate *driScreen;
unsigned int sarea_priv_offset;