summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2016-03-18 14:39:51 +0100
committerThierry Reding <treding@nvidia.com>2016-07-04 11:36:20 +0200
commit6c95e8d382b62dcfd164506644e464db17c7e984 (patch)
tree51cd552d5743c82193805511c4638c7903b30e0a
parent7ed5cbdbcccb275a8c804a5c853e76fab6b8a14c (diff)
fixups
-rw-r--r--src/gallium/drivers/tegra/tegra_context.c8
-rw-r--r--src/gallium/drivers/tegra/tegra_resource.c23
-rw-r--r--src/gallium/drivers/tegra/tegra_resource.h6
-rw-r--r--src/gallium/targets/dri/target.c2
4 files changed, 23 insertions, 16 deletions
diff --git a/src/gallium/drivers/tegra/tegra_context.c b/src/gallium/drivers/tegra/tegra_context.c
index 9a0ce5b16599..61630591f7c3 100644
--- a/src/gallium/drivers/tegra/tegra_context.c
+++ b/src/gallium/drivers/tegra/tegra_context.c
@@ -543,15 +543,15 @@ tegra_set_sampler_views(struct pipe_context *pcontext,
static void
tegra_set_shader_images(struct pipe_context *pcontext, unsigned shader,
unsigned start, unsigned count,
- struct pipe_image_view **views)
+ struct pipe_image_view *images)
{
struct tegra_context *context = to_tegra_context(pcontext);
- debug_printf("> %s(pcontext=%p, shader=%u, start=%u, count=%u, views=%p)\n",
- __func__, pcontext, shader, start, count, views);
+ debug_printf("> %s(pcontext=%p, shader=%u, start=%u, count=%u, images=%p)\n",
+ __func__, pcontext, shader, start, count, images);
context->gpu->set_shader_images(context->gpu, shader, start, count,
- views);
+ images);
debug_printf("< %s()\n", __func__);
}
diff --git a/src/gallium/drivers/tegra/tegra_resource.c b/src/gallium/drivers/tegra/tegra_resource.c
index 3b8accad9f3d..1f38d4b3f3b0 100644
--- a/src/gallium/drivers/tegra/tegra_resource.c
+++ b/src/gallium/drivers/tegra/tegra_resource.c
@@ -70,6 +70,7 @@ tegra_resource_create(struct pipe_screen *pscreen,
/* import scanout buffers for display */
if (template->bind & PIPE_BIND_SCANOUT) {
+ unsigned usage = PIPE_HANDLE_USAGE_READ;
struct drm_tegra_gem_set_tiling args;
struct winsys_handle handle;
boolean status;
@@ -85,7 +86,7 @@ tegra_resource_create(struct pipe_screen *pscreen,
status = screen->gpu->resource_get_handle(screen->gpu,
resource->gpu,
- &handle);
+ &handle, usage);
if (!status)
goto destroy;
@@ -140,21 +141,22 @@ free:
struct pipe_resource *
tegra_resource_from_handle(struct pipe_screen *pscreen,
const struct pipe_resource *template,
- struct winsys_handle *handle)
+ struct winsys_handle *handle,
+ unsigned usage)
{
struct tegra_screen *screen = to_tegra_screen(pscreen);
struct tegra_resource *resource;
- _debug_printf("> %s(pscreen=%p, template=%p, handle=%p)\n", __func__,
- pscreen, template);
+ _debug_printf("> %s(pscreen=%p, template=%p, handle=%p, usage=%u)\n",
+ __func__, pscreen, template, handle, usage);
resource = calloc(1, sizeof(*resource));
if (!resource)
return NULL;
resource->gpu = screen->gpu->resource_from_handle(screen->gpu,
- template,
- handle);
+ template, handle,
+ usage);
if (!resource->gpu) {
free(resource);
return NULL;
@@ -171,14 +173,15 @@ tegra_resource_from_handle(struct pipe_screen *pscreen,
boolean
tegra_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_resource *presource,
- struct winsys_handle *handle)
+ struct winsys_handle *handle,
+ unsigned usage)
{
struct tegra_resource *resource = to_tegra_resource(presource);
struct tegra_screen *screen = to_tegra_screen(pscreen);
boolean ret = TRUE;
- debug_printf("> %s(pscreen=%p, presource=%p, handle=%p)\n", __func__,
- pscreen, presource, handle);
+ debug_printf("> %s(pscreen=%p, presource=%p, handle=%p, usage=%u)\n",
+ __func__, pscreen, presource, handle, usage);
if (presource->bind & PIPE_BIND_SCANOUT) {
handle->handle = resource->handle;
@@ -186,7 +189,7 @@ tegra_resource_get_handle(struct pipe_screen *pscreen,
} else {
ret = screen->gpu->resource_get_handle(screen->gpu,
resource->gpu,
- handle);
+ handle, usage);
}
debug_printf("< %s() = %d\n", __func__, ret);
diff --git a/src/gallium/drivers/tegra/tegra_resource.h b/src/gallium/drivers/tegra/tegra_resource.h
index b1a3bc5b9f53..a052a44b6313 100644
--- a/src/gallium/drivers/tegra/tegra_resource.h
+++ b/src/gallium/drivers/tegra/tegra_resource.h
@@ -58,11 +58,13 @@ tegra_resource_create(struct pipe_screen *pscreen,
struct pipe_resource *
tegra_resource_from_handle(struct pipe_screen *pscreen,
const struct pipe_resource *template,
- struct winsys_handle *handle);
+ struct winsys_handle *handle,
+ unsigned usage);
boolean
tegra_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_resource *resource,
- struct winsys_handle *handle);
+ struct winsys_handle *handle,
+ unsigned usage);
void
tegra_resource_destroy(struct pipe_screen *pscreen,
struct pipe_resource *resource);
diff --git a/src/gallium/targets/dri/target.c b/src/gallium/targets/dri/target.c
index 2db3f0a4438f..4de7f06f9db4 100644
--- a/src/gallium/targets/dri/target.c
+++ b/src/gallium/targets/dri/target.c
@@ -161,6 +161,7 @@ PUBLIC const __DRIextension **__driDriverGetExtensions_i965(void)
return galliumdrm_driver_extensions;
}
#endif
+#endif
#if defined(GALLIUM_TEGRA)
#if defined(DRI_TARGET)
@@ -172,3 +173,4 @@ PUBLIC const __DRIextension **__driDriverGetExtensions_tegra(void)
return galliumdrm_driver_extensions;
}
#endif
+#endif