summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/gallium/drivers/rbug/rbug_screen.c')
-rw-r--r--lib/mesa/src/gallium/drivers/rbug/rbug_screen.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c b/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c
index 7da4e8156..3742c1033 100644
--- a/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c
+++ b/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c
@@ -129,13 +129,13 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen,
static struct pipe_context *
rbug_screen_context_create(struct pipe_screen *_screen,
- void *priv)
+ void *priv, unsigned flags)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
struct pipe_context *result;
- result = screen->context_create(screen, priv);
+ result = screen->context_create(screen, priv, flags);
if (result)
return rbug_context_create(_screen, result);
return NULL;
@@ -160,13 +160,14 @@ rbug_screen_resource_create(struct pipe_screen *_screen,
static struct pipe_resource *
rbug_screen_resource_from_handle(struct pipe_screen *_screen,
const struct pipe_resource *templ,
- struct winsys_handle *handle)
+ struct winsys_handle *handle,
+ unsigned usage)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
struct pipe_resource *result;
- result = screen->resource_from_handle(screen, templ, handle);
+ result = screen->resource_from_handle(screen, templ, handle, usage);
result = rbug_resource_create(rbug_screen(_screen), result);
@@ -175,15 +176,19 @@ rbug_screen_resource_from_handle(struct pipe_screen *_screen,
static boolean
rbug_screen_resource_get_handle(struct pipe_screen *_screen,
+ struct pipe_context *_pipe,
struct pipe_resource *_resource,
- struct winsys_handle *handle)
+ struct winsys_handle *handle,
+ unsigned usage)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
+ struct rbug_context *rb_pipe = rbug_context(_pipe);
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_handle(screen, resource, handle);
+ return screen->resource_get_handle(screen, rb_pipe ? rb_pipe->pipe : NULL,
+ resource, handle, usage);
}
@@ -227,15 +232,15 @@ rbug_screen_fence_reference(struct pipe_screen *_screen,
static boolean
rbug_screen_fence_finish(struct pipe_screen *_screen,
+ struct pipe_context *_ctx,
struct pipe_fence_handle *fence,
uint64_t timeout)
{
struct rbug_screen *rb_screen = rbug_screen(_screen);
struct pipe_screen *screen = rb_screen->screen;
+ struct pipe_context *ctx = _ctx ? rbug_context(_ctx)->pipe : NULL;
- return screen->fence_finish(screen,
- fence,
- timeout);
+ return screen->fence_finish(screen, ctx, fence, timeout);
}
boolean
@@ -281,7 +286,7 @@ rbug_screen_create(struct pipe_screen *screen)
rb_screen->screen = screen;
- rb_screen->private_context = screen->context_create(screen, NULL);
+ rb_screen->private_context = screen->context_create(screen, NULL, 0);
if (!rb_screen->private_context)
goto err_free;