diff options
author | Ilia Mirkin <[email protected]> | 2014-01-17 22:33:47 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-01-19 20:02:10 -0500 |
commit | f5788e042afbb93e693885e90609d552674f9bd2 (patch) | |
tree | 65f8073035b1b53198733873c4e3dec218266473 /src/gallium/state_trackers/vdpau/bitmap.c | |
parent | 813ce219c87bd40ebee1cd170b792e11971cb01d (diff) |
st/vdpau: check surface params before creating surfaces
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/bitmap.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/bitmap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/bitmap.c b/src/gallium/state_trackers/vdpau/bitmap.c index 87def5042eb..335c224f700 100644 --- a/src/gallium/state_trackers/vdpau/bitmap.c +++ b/src/gallium/state_trackers/vdpau/bitmap.c @@ -80,6 +80,12 @@ vlVdpBitmapSurfaceCreate(VdpDevice device, res_tmpl.usage = frequently_accessed ? PIPE_USAGE_DYNAMIC : PIPE_USAGE_STATIC; pipe_mutex_lock(dev->mutex); + + if (!CheckSurfaceParams(pipe->screen, &res_tmpl)) { + ret = VDP_STATUS_RESOURCES; + goto err_unlock; + } + res = pipe->screen->resource_create(pipe->screen, &res_tmpl); if (!res) { ret = VDP_STATUS_RESOURCES; |