summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/rbug/rbug_screen.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-10-09 18:44:50 +0200
committerMarek Olšák <[email protected]>2017-10-12 19:03:33 +0200
commit07fdc0a09cd8f7af8231c4bede158588c6649ce4 (patch)
tree585e11ca368297335aae9bdc57ba2f4c1b603b0c /src/gallium/drivers/rbug/rbug_screen.c
parent5f2073be3282a233a8b5bcb5342ea5e599b9b316 (diff)
gallium: add pipe_screen::check_resource_capability
This is optional (and no CAP). Implemented by radeonsi, ddebug, rbug, trace. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
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 b12f029b3ea..2477edbadf0 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -183,6 +183,19 @@ rbug_screen_resource_from_handle(struct pipe_screen *_screen,
return result;
}
+static bool
+rbug_screen_check_resource_capability(struct pipe_screen *_screen,
+ struct pipe_resource *_resource,
+ unsigned bind)
+{
+ 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;
+
+ return screen->check_resource_capability(screen, resource, bind);
+}
+
static boolean
rbug_screen_resource_get_handle(struct pipe_screen *_screen,
struct pipe_context *_pipe,
@@ -301,6 +314,7 @@ rbug_screen_create(struct pipe_screen *screen)
rb_screen->base.context_create = rbug_screen_context_create;
rb_screen->base.resource_create = rbug_screen_resource_create;
rb_screen->base.resource_from_handle = rbug_screen_resource_from_handle;
+ SCR_INIT(check_resource_capability);
rb_screen->base.resource_get_handle = rbug_screen_resource_get_handle;
SCR_INIT(resource_changed);
rb_screen->base.resource_destroy = rbug_screen_resource_destroy;