diff options
-rw-r--r-- | src/gallium/auxiliary/driver_rbug/rbug_screen.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/driver_rbug/rbug_screen.c b/src/gallium/auxiliary/driver_rbug/rbug_screen.c index 6c7a7cfc9ea..1a27618ef49 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_screen.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_screen.c @@ -138,6 +138,23 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen, tex_usage); } +static void +rbug_screen_query_dmabuf_modifiers(struct pipe_screen *_screen, + enum pipe_format format, int max, + uint64_t *modifiers, + unsigned int *external_only, int *count) +{ + struct rbug_screen *rb_screen = rbug_screen(_screen); + struct pipe_screen *screen = rb_screen->screen; + + screen->query_dmabuf_modifiers(screen, + format, + max, + modifiers, + external_only, + count); +} + static struct pipe_context * rbug_screen_context_create(struct pipe_screen *_screen, void *priv, unsigned flags) @@ -180,6 +197,25 @@ rbug_screen_resource_create(struct pipe_screen *_screen, } static struct pipe_resource * +rbug_screen_resource_create_with_modifiers(struct pipe_screen *_screen, + const struct pipe_resource *templat, + const uint64_t *modifiers, int count) +{ + struct rbug_screen *rb_screen = rbug_screen(_screen); + struct pipe_screen *screen = rb_screen->screen; + struct pipe_resource *result; + + result = screen->resource_create_with_modifiers(screen, + templat, + modifiers, + count); + + if (result) + return rbug_resource_create(rb_screen, result); + return NULL; +} + +static struct pipe_resource * rbug_screen_resource_from_handle(struct pipe_screen *_screen, const struct pipe_resource *templ, struct winsys_handle *handle, @@ -371,9 +407,11 @@ rbug_screen_create(struct pipe_screen *screen) rb_screen->base.get_shader_param = rbug_screen_get_shader_param; rb_screen->base.get_paramf = rbug_screen_get_paramf; rb_screen->base.is_format_supported = rbug_screen_is_format_supported; + SCR_INIT(query_dmabuf_modifiers); rb_screen->base.context_create = rbug_screen_context_create; SCR_INIT(can_create_resource); rb_screen->base.resource_create = rbug_screen_resource_create; + SCR_INIT(resource_create_with_modifiers); 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; |