summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2019-08-13 14:32:26 -0700
committerKenneth Graunke <kenneth@whitecape.org>2019-08-21 22:18:22 +0000
commitc43a44791bfce12da6fb86e05a29fc819c1c1878 (patch)
tree9beabac9b87606ed396aa8a97c2f64fff49b3d42
parent0e6b573ae57da2fd15891c7e9d2a9024203aa507 (diff)
gallium/trace: Wrap resource_get_param if available
Fixes: 0346b700833 ("gallium/screen: Add pipe_screen::resource_get_param") Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/auxiliary/driver_trace/tr_screen.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c
index 41243cf72afc..0417e2339c24 100644
--- a/src/gallium/auxiliary/driver_trace/tr_screen.c
+++ b/src/gallium/auxiliary/driver_trace/tr_screen.c
@@ -407,6 +407,21 @@ trace_screen_resource_get_handle(struct pipe_screen *_screen,
resource, handle, usage);
}
+static bool
+trace_screen_resource_get_param(struct pipe_screen *_screen,
+ struct pipe_resource *resource,
+ unsigned int plane,
+ enum pipe_resource_param param,
+ uint64_t *value)
+{
+ struct trace_screen *tr_screen = trace_screen(_screen);
+ struct pipe_screen *screen = tr_screen->screen;
+
+ /* TODO trace call */
+
+ return screen->resource_get_param(screen, resource, plane, param, value);
+}
+
static void
trace_screen_resource_get_info(struct pipe_screen *_screen,
struct pipe_resource *resource,
@@ -687,6 +702,7 @@ trace_screen_create(struct pipe_screen *screen)
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_get_param);
SCR_INIT(resource_get_info);
SCR_INIT(resource_from_memobj);
SCR_INIT(resource_changed);