r300g: don't call buffer_unmap in draw functions
authorMarek Olšák <maraeo@gmail.com>
Tue, 13 Nov 2012 14:48:25 +0000 (15:48 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 13 Nov 2012 14:53:17 +0000 (15:53 +0100)
It's been a no-op anyway.

src/gallium/drivers/r300/r300_render.c

index 46d7ea1748b143d3ab0feb259218ca111db03271..4a6a6c4d02597843d7c340a02e79b81039b63040 100644 (file)
@@ -395,16 +395,6 @@ static void r300_draw_arrays_immediate(struct r300_context *r300,
         }
     }
     END_CS;
-
-    /* Unmap buffers. */
-    for (i = 0; i < vertex_element_count; i++) {
-        vbi = r300->velems->velem[i].vertex_buffer_index;
-
-        if (map[vbi]) {
-            r300->rws->buffer_unmap(r300_resource(r300->vertex_buffer[vbi].buffer)->cs_buf);
-            map[vbi] = NULL;
-        }
-    }
 }
 
 static void r300_emit_draw_arrays(struct r300_context *r300,
@@ -630,7 +620,6 @@ static void r300_draw_elements(struct r300_context *r300,
             r300_upload_index_buffer(r300, &indexBuffer, indexSize, &start,
                                      count, (uint8_t*)ptr);
         }
-        r300->rws->buffer_unmap(r300_resource(orgIndexBuffer)->cs_buf);
     } else {
         if (r300->index_buffer.user_buffer)
             r300_upload_index_buffer(r300, &indexBuffer, indexSize,