r300-gallium: Fix a handful of compiler warnings.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 10 Mar 2009 07:14:56 +0000 (00:14 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 10 Mar 2009 07:36:08 +0000 (00:36 -0700)
Missing INLINE, missing declarations, extraneous definitions. The usual.

src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_emit.h
src/gallium/drivers/r300/r300_state_inlines.h

index 1c4a7d9aa09a9ffa572db395b71e8c1dd0d7b2bc..ad65832ab345340e0c32a6de68ef40601d3f76cb 100644 (file)
@@ -193,7 +193,6 @@ void r300_emit_fb_state(struct r300_context* r300,
 
 void r300_emit_rs_state(struct r300_context* r300, struct r300_rs_state* rs)
 {
-    struct r300_screen* r300screen = r300_screen(r300->context.screen);
     CS_LOCALS(r300);
 
     BEGIN_CS(20);
@@ -313,6 +312,16 @@ void r300_emit_vertex_format_state(struct r300_context* r300)
     END_CS;
 }
 
+static void r300_flush_textures(struct r300_context* r300)
+{
+    CS_LOCALS(r300);
+
+    BEGIN_CS(4);
+    OUT_CS_REG(R300_TX_INVALTAGS, 0);
+    OUT_CS_REG(R300_TX_ENABLE, (1 << r300->texture_count) - 1);
+    END_CS;
+}
+
 /* Emit all dirty state. */
 void r300_emit_dirty_state(struct r300_context* r300)
 {
@@ -374,6 +383,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
                 r300_emit_sampler(r300, r300->sampler_states[i], i);
                 r300->dirty_state &= ~(R300_NEW_SAMPLER << i);
             }
+            r300_flush_textures(r300);
         }
     }
 
@@ -388,6 +398,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
                 r300_emit_texture(r300, r300->textures[i], i);
                 r300->dirty_state &= ~(R300_NEW_TEXTURE << i);
             }
+            r300_flush_textures(r300);
         }
     }
 
index f21ca331716e57cce7b8c6a7fad2881fe14e211c..4aba1ee08ce8ad01e06110753759516385886e05 100644 (file)
@@ -49,9 +49,13 @@ void r300_emit_fb_state(struct r300_context* r300,
 
 void r300_emit_rs_state(struct r300_context* r300, struct r300_rs_state* rs);
 
+void r300_emit_rs_block_state(struct r300_context* r300,
+                              struct r300_rs_block* rs);
+
 void r300_emit_scissor_state(struct r300_context* r300,
                              struct r300_scissor_state* scissor);
 
+void r300_emit_vertex_format_state(struct r300_context* r300);
 
 /* Emit all dirty state. */
 void r300_emit_dirty_state(struct r300_context* r300);
index cd3a4313f76011889dd516b1b211329b37f44b0f..4b3183471af8413d75bc9c88378a925983b7b5b3 100644 (file)
@@ -344,7 +344,7 @@ static INLINE uint32_t r300_translate_gb_pipes(int pipe_count)
     return 0;
 }
 
-static uint32_t translate_vertex_data_type(int type) {
+static INLINE uint32_t translate_vertex_data_type(int type) {
     switch (type) {
         case EMIT_1F:
         case EMIT_1F_PSIZE: