r300g: don't check for vertex and index buffer bind flags
authorMarek Olšák <maraeo@gmail.com>
Wed, 2 Jan 2013 19:28:10 +0000 (20:28 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 4 Jan 2013 20:08:28 +0000 (21:08 +0100)
src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r300/r300_screen_buffer.c

index b7256682b557cfe980ed01b089f191e31c07719d..8178c394d07c27e74ef9db323f8e5ef75a263324 100644 (file)
@@ -447,8 +447,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
         memset(&vb, 0, sizeof(vb));
         vb.target = PIPE_BUFFER;
         vb.format = PIPE_FORMAT_R8_UNORM;
-        vb.bind = PIPE_BIND_VERTEX_BUFFER;
-        vb.usage = PIPE_USAGE_IMMUTABLE;
+        vb.usage = PIPE_USAGE_STATIC;
         vb.width0 = sizeof(float) * 16;
         vb.height0 = 1;
         vb.depth0 = 1;
index 0c1e69b7a4c01085edbfd9d3cf7987fc80d0dee8..e2312d058edb001f1347a7685ad6c54013087652 100644 (file)
@@ -174,8 +174,7 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
 
     /* Alloc constant buffers and SWTCL buffers in RAM. */
     if (templ->bind & PIPE_BIND_CONSTANT_BUFFER ||
-        (!r300screen->caps.has_tcl &&
-         (templ->bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)))) {
+        !r300screen->caps.has_tcl) {
         rbuf->malloced_buffer = align_malloc(templ->width0, 64);
         return &rbuf->b.b;
     }