silence misc warnings
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 3 Sep 2005 16:39:57 +0000 (16:39 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 3 Sep 2005 16:39:57 +0000 (16:39 +0000)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_shader.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/r300/radeon_screen.c
src/mesa/drivers/dri/r300/radeon_screen.h

index 327a398d4d77353d86f79474b918bc129149ec4b..9ef74dd9aba9552798cc3782d8846b6f75b98e0e 100644 (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 */
 
index 9c6788ec3e358125f780da91f51d7ebdd1ad50fc..aa9645e163e40d94c8e40b10e2891ef19aaca860 100644 (file)
 
 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) {
index b06629ca13a0584340535a34f30d7c4c78125e6c..22fbe2e18a045988d948c66afd7538c8ab1c5be1 100644 (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) &&
index ea15e872877bb3d98615f1d1be360e5b6dbff319..03c30f82973bbdcad76c72da4f52ef91a770699c 100644 (file)
@@ -746,6 +746,7 @@ static GLboolean radeonCreateContext(const __GLcontextModes * glVisual,
        else
                return r200CreateContext(glVisual, driContextPriv, sharedContextPriv);
 #endif
+        return GL_FALSE;
 }
 
 
index ac8471feaa36f3387c89e85f4b3f87658d94a30c..4a331dc0626cf70c56349fa88ead0ab8b4a113ca 100644 (file)
@@ -93,7 +93,7 @@ typedef struct {
 
        drmBufMapPtr buffers;
 
-       __volatile__ int32_t *scratch;
+       __volatile__ uint32_t *scratch;
 
        __DRIscreenPrivate *driScreen;
        unsigned int sarea_priv_offset;