aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/driver_rbug
diff options
context:
space:
mode:
authorJulien Isorce <[email protected]>2019-04-23 14:26:33 -0700
committerJulien Isorce <[email protected]>2019-04-30 17:53:12 +0000
commita3c202de0a963c0562796cf75e3a9b3eedf1afad (patch)
treed5944a294314d5a154833fd2b6b4b5667e1f8166 /src/gallium/auxiliary/driver_rbug
parentec6c2297634eba77248a929048cf4201887a5f0a (diff)
gallium: add resource_get_info to pipe_screen
Generic plumbing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/driver_rbug')
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_screen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/driver_rbug/rbug_screen.c b/src/gallium/auxiliary/driver_rbug/rbug_screen.c
index 693e7fab912..6d93fb8e953 100644
--- a/src/gallium/auxiliary/driver_rbug/rbug_screen.c
+++ b/src/gallium/auxiliary/driver_rbug/rbug_screen.c
@@ -216,6 +216,20 @@ rbug_screen_resource_get_handle(struct pipe_screen *_screen,
}
static void
+rbug_screen_resource_get_info(struct pipe_screen *_screen,
+ struct pipe_resource *_resource,
+ unsigned *stride,
+ unsigned *offset)
+{
+ 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;
+
+ screen->resource_get_info(screen, resource, stride, offset);
+}
+
+static void
rbug_screen_resource_changed(struct pipe_screen *_screen,
struct pipe_resource *_resource)
{
@@ -319,6 +333,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_info);
SCR_INIT(resource_changed);
rb_screen->base.resource_destroy = rbug_screen_resource_destroy;
rb_screen->base.flush_frontbuffer = rbug_screen_flush_frontbuffer;