summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/rbug/rbug_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/rbug/rbug_screen.c')
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index 3742c103306..8fbbe7319fb 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -191,7 +191,17 @@ rbug_screen_resource_get_handle(struct pipe_screen *_screen,
resource, handle, usage);
}
+static void
+rbug_screen_resource_changed(struct pipe_screen *_screen,
+ struct pipe_resource *_resource)
+{
+ struct rbug_screen *rb_screen = rbug_screen(_screen);
+ struct rbug_resource *rb_resource = rbug_resource(_resource);
+ struct pipe_screen *screen = rb_screen->screen;
+ struct pipe_resource *resource = rb_resource->resource;
+ screen->resource_changed(screen, resource);
+}
static void
rbug_screen_resource_destroy(struct pipe_screen *screen,
@@ -267,6 +277,9 @@ rbug_screen_create(struct pipe_screen *screen)
make_empty_list(&rb_screen->surfaces);
make_empty_list(&rb_screen->transfers);
+#define SCR_INIT(_member) \
+ rb_screen->base._member = screen->_member ? rbug_screen_##_member : NULL
+
rb_screen->base.destroy = rbug_screen_destroy;
rb_screen->base.get_name = rbug_screen_get_name;
rb_screen->base.get_vendor = rbug_screen_get_vendor;
@@ -279,6 +292,7 @@ rbug_screen_create(struct pipe_screen *screen)
rb_screen->base.resource_create = rbug_screen_resource_create;
rb_screen->base.resource_from_handle = rbug_screen_resource_from_handle;
rb_screen->base.resource_get_handle = rbug_screen_resource_get_handle;
+ SCR_INIT(resource_changed);
rb_screen->base.resource_destroy = rbug_screen_resource_destroy;
rb_screen->base.flush_frontbuffer = rbug_screen_flush_frontbuffer;
rb_screen->base.fence_reference = rbug_screen_fence_reference;