summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-08-13 14:32:57 -0700
committerDylan Baker <[email protected]>2019-09-04 11:51:44 -0700
commit813ed8629ee072fa19ed5cbdf03a7a850a682e36 (patch)
tree952c6b0b56f27cf6abecb1d3990e6cca6b2c83ee /src
parent6e6f137a4efe9c94169e35c748c6a18b35561c77 (diff)
gallium/rbug: Wrap resource_get_param if available
Fixes: 0346b700833 ("gallium/screen: Add pipe_screen::resource_get_param") Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit f02d1a0b75c72f600ecdd73020673e4bec015153)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_screen.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/driver_rbug/rbug_screen.c b/src/gallium/auxiliary/driver_rbug/rbug_screen.c
index 2b00e34dbc5..247745fa533 100644
--- a/src/gallium/auxiliary/driver_rbug/rbug_screen.c
+++ b/src/gallium/auxiliary/driver_rbug/rbug_screen.c
@@ -215,6 +215,22 @@ rbug_screen_resource_get_handle(struct pipe_screen *_screen,
resource, handle, usage);
}
+static bool
+rbug_screen_resource_get_param(struct pipe_screen *_screen,
+ struct pipe_resource *_resource,
+ unsigned int plane,
+ enum pipe_resource_param param,
+ uint64_t *value)
+{
+ 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->resource_get_param(screen, resource, plane, param, value);
+}
+
+
static void
rbug_screen_resource_get_info(struct pipe_screen *_screen,
struct pipe_resource *_resource,
@@ -333,6 +349,7 @@ rbug_screen_create(struct pipe_screen *screen)
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_get_param);
SCR_INIT(resource_get_info);
SCR_INIT(resource_changed);
rb_screen->base.resource_destroy = rbug_screen_resource_destroy;