diff options
author | Charmaine Lee <charmainel@vmware.com> | 2014-08-12 07:37:12 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2014-08-12 08:03:24 -0600 |
commit | 0c065270c0ff063edba03516b22d734023cac912 (patch) | |
tree | 33a6cf749f9a93cf1f24c3c9c747f659d28c3e97 /src/gallium/drivers/svga/svga_resource_texture.c | |
parent | d839be24b3b53717fcc153c3d00afb1c516d926e (diff) | |
download | external_mesa3d-0c065270c0ff063edba03516b22d734023cac912.zip external_mesa3d-0c065270c0ff063edba03516b22d734023cac912.tar.gz external_mesa3d-0c065270c0ff063edba03516b22d734023cac912.tar.bz2 |
svga: Add a limit to the maximum surface size
This patch adds a limit to the maximum surface size which is
based on the maximum size of a single mob. If this value is not
available, the maximum surface size is by default set to 128 MB.
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource_texture.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_texture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 5c601f8..75e2745 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -727,8 +727,10 @@ svga_texture_create(struct pipe_screen *screen, SVGA_DBG(DEBUG_DMA, "surface_create for texture\n", tex->handle); tex->handle = svga_screen_surface_create(svgascreen, &tex->key); - if (tex->handle) - SVGA_DBG(DEBUG_DMA, " --> got sid %p (texture)\n", tex->handle); + if (!tex->handle) + goto error2; + + SVGA_DBG(DEBUG_DMA, " --> got sid %p (texture)\n", tex->handle); debug_reference(&tex->b.b.reference, (debug_reference_descriptor)debug_describe_resource, 0); |