From 7fa6c1afb9b85231c3b2e8c51672e9ca26efc070 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 3 Sep 2005 16:39:57 +0000 Subject: [PATCH] silence misc warnings --- src/mesa/drivers/dri/r300/r300_cmdbuf.c | 5 +---- src/mesa/drivers/dri/r300/r300_shader.c | 25 +++++++++++++++-------- src/mesa/drivers/dri/r300/r300_texstate.c | 6 ++++-- src/mesa/drivers/dri/r300/radeon_screen.c | 1 + src/mesa/drivers/dri/r300/radeon_screen.h | 2 +- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index 327a398d4d7..9ef74dd9aba 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -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 */ diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c index 9c6788ec3e3..aa9645e163e 100644 --- a/src/mesa/drivers/dri/r300/r300_shader.c +++ b/src/mesa/drivers/dri/r300/r300_shader.c @@ -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) { diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index b06629ca13a..22fbe2e18a0 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -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) && diff --git a/src/mesa/drivers/dri/r300/radeon_screen.c b/src/mesa/drivers/dri/r300/radeon_screen.c index ea15e872877..03c30f82973 100644 --- a/src/mesa/drivers/dri/r300/radeon_screen.c +++ b/src/mesa/drivers/dri/r300/radeon_screen.c @@ -746,6 +746,7 @@ static GLboolean radeonCreateContext(const __GLcontextModes * glVisual, else return r200CreateContext(glVisual, driContextPriv, sharedContextPriv); #endif + return GL_FALSE; } diff --git a/src/mesa/drivers/dri/r300/radeon_screen.h b/src/mesa/drivers/dri/r300/radeon_screen.h index ac8471feaa3..4a331dc0626 100644 --- a/src/mesa/drivers/dri/r300/radeon_screen.h +++ b/src/mesa/drivers/dri/r300/radeon_screen.h @@ -93,7 +93,7 @@ typedef struct { drmBufMapPtr buffers; - __volatile__ int32_t *scratch; + __volatile__ uint32_t *scratch; __DRIscreenPrivate *driScreen; unsigned int sarea_priv_offset; -- 2.30.2