r300g: fix gallium-vertexlementcso merge damage
authorRoland Scheidegger <sroland@vmware.com>
Tue, 9 Mar 2010 15:24:47 +0000 (16:24 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 9 Mar 2010 15:24:47 +0000 (16:24 +0100)
src/gallium/drivers/r300/r300_emit.c
src/gallium/drivers/r300/r300_render.c
src/gallium/drivers/r300/r300_state_derived.c

index 65377b3865aa8c5ffa0b241348787c82dec99761..55e9217fd323cc24f92dc09b0426b2817d2caeb8 100644 (file)
@@ -1004,7 +1004,7 @@ void r300_emit_buffer_validate(struct r300_context *r300,
         (struct r300_textures_state*)r300->textures_state.state;
     struct r300_texture* tex;
     struct pipe_vertex_buffer *vbuf = r300->vertex_buffer;
-    struct pipe_vertex_element *velem = r300->vertex_element;
+    struct pipe_vertex_element *velem = r300->velems->velem;
     struct pipe_buffer *pbuf;
     unsigned i;
     boolean invalid = FALSE;
@@ -1062,7 +1062,7 @@ validate:
     }
     /* ...vertex buffers for HWTCL path... */
     if (do_validate_vertex_buffers) {
-        for (i = 0; i < r300->vertex_element_count; i++) {
+        for (i = 0; i < r300->velems->count; i++) {
             pbuf = vbuf[velem[i].vertex_buffer_index].buffer;
 
             if (!r300->winsys->add_buffer(r300->winsys, pbuf,
index d0e06ade40fb4ec89c5d73ee1090a96114a6a2b9..2605628c025f324729574cb1853939a5e3cf5b35 100644 (file)
@@ -319,31 +319,6 @@ static void r300_emit_draw_elements(struct r300_context *r300,
     END_CS;
 }
 
-static boolean r300_setup_vertex_buffers(struct r300_context *r300)
-{
-    struct pipe_vertex_buffer *vbuf = r300->vertex_buffer;
-    struct pipe_vertex_element *velem = r300->velems->velem;
-    struct pipe_buffer *pbuf;
-
-validate:
-    for (int i = 0; i < r300->velems->count; i++) {
-        pbuf = vbuf[velem[i].vertex_buffer_index].buffer;
-
-        if (!r300->winsys->add_buffer(r300->winsys, pbuf,
-                                      RADEON_GEM_DOMAIN_GTT, 0)) {
-            r300->context.flush(&r300->context, 0, NULL);
-            goto validate;
-        }
-    }
-
-    if (!r300->winsys->validate(r300->winsys)) {
-        r300->context.flush(&r300->context, 0, NULL);
-        return r300->winsys->validate(r300->winsys);
-    }
-
-    return TRUE;
-}
-
 static void r300_shorten_ubyte_elts(struct r300_context* r300,
                                     struct pipe_buffer** elts,
                                     unsigned count)
index 4422581b51482606207707bf96eddfeddb30d843..81a373abad2b076845a9b6e04e6e404ff37be848 100644 (file)
@@ -128,7 +128,6 @@ static void r300_vertex_psc(struct r300_context* r300)
             " in psc\n",
             vs->info.num_inputs,
             r300->velems->count);
-            r300->vertex_element_count);
 
     for (i = 0; i < r300->velems->count; i++) {
         format = r300->velems->velem[i].src_format;