From 07fdc0a09cd8f7af8231c4bede158588c6649ce4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 9 Oct 2017 18:44:50 +0200 Subject: gallium: add pipe_screen::check_resource_capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is optional (and no CAP). Implemented by radeonsi, ddebug, rbug, trace. Reviewed-by: Daniel Stone Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/rbug/rbug_screen.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gallium/drivers/rbug/rbug_screen.c') 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; -- cgit v1.2.3