rbug: only add textures to the list
authorMarek Olšák <marek.olsak@amd.com>
Sat, 16 Aug 2014 23:36:57 +0000 (01:36 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 19 Aug 2014 10:20:18 +0000 (12:20 +0200)
rbug-gui cannot display buffers, so it's pointless to add them.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/rbug/rbug_objects.c

index 2d80164d3bf1c035c4534d800aefffb36a43f505..db18f2e1c22a3dae6304ac2d4bb11999e4b6a30d 100644 (file)
@@ -58,7 +58,8 @@ rbug_resource_create(struct rbug_screen *rb_screen,
    rb_resource->base.screen = &rb_screen->base;
    rb_resource->resource = resource;
 
-   rbug_screen_add_to_list(rb_screen, resources, rb_resource);
+   if (resource->target != PIPE_BUFFER)
+      rbug_screen_add_to_list(rb_screen, resources, rb_resource);
 
    return &rb_resource->base;
 
@@ -71,7 +72,9 @@ void
 rbug_resource_destroy(struct rbug_resource *rb_resource)
 {
    struct rbug_screen *rb_screen = rbug_screen(rb_resource->base.screen);
-   rbug_screen_remove_from_list(rb_screen, resources, rb_resource);
+
+   if (rb_resource->base.target != PIPE_BUFFER)
+      rbug_screen_remove_from_list(rb_screen, resources, rb_resource);
 
    pipe_resource_reference(&rb_resource->resource, NULL);
    FREE(rb_resource);