summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace
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/trace
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/trace')
-rw-r--r--src/gallium/drivers/trace/tr_screen.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index 539b17e2702..d5a81249b51 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -379,6 +379,16 @@ trace_screen_resource_from_handle(struct pipe_screen *_screen,
return result;
}
+static bool
+trace_screen_check_resource_capability(struct pipe_screen *_screen,
+ struct pipe_resource *resource,
+ unsigned bind)
+{
+ struct pipe_screen *screen = trace_screen(_screen)->screen;
+
+ return screen->check_resource_capability(screen, resource, bind);
+}
+
static boolean
trace_screen_resource_get_handle(struct pipe_screen *_screen,
struct pipe_context *_pipe,
@@ -636,6 +646,7 @@ trace_screen_create(struct pipe_screen *screen)
tr_scr->base.context_create = trace_screen_context_create;
tr_scr->base.resource_create = trace_screen_resource_create;
tr_scr->base.resource_from_handle = trace_screen_resource_from_handle;
+ SCR_INIT(check_resource_capability);
tr_scr->base.resource_get_handle = trace_screen_resource_get_handle;
SCR_INIT(resource_from_memobj);
SCR_INIT(resource_changed);