summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vdpau/output.c')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index ecf15796df5..59874cb0965 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -83,6 +83,10 @@ vlVdpOutputSurfaceCreate(VdpDevice device,
res_tmpl.usage = PIPE_USAGE_STATIC;
pipe_mutex_lock(dev->mutex);
+
+ if (!CheckSurfaceParams(pipe->screen, &res_tmpl))
+ goto err_unlock;
+
res = pipe->screen->resource_create(pipe->screen, &res_tmpl);
if (!res)
goto err_unlock;
@@ -319,6 +323,9 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface,
pipe_mutex_lock(vlsurface->device->mutex);
vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL);
+ if (!CheckSurfaceParams(context->screen, &res_tmpl))
+ goto error_resource;
+
res = context->screen->resource_create(context->screen, &res_tmpl);
if (!res)
goto error_resource;