summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:49:53 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 02:49:53 +0000
commitd264279e28002d81821c883795911844a4c01a2c (patch)
treeb0481616eda55b543a0dc1487d096c3239885c41 /lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c
parentfdcc03929065b5bf5dd93553db219ea3e05c8c34 (diff)
Merge Mesa 19.2.8
Diffstat (limited to 'lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c')
-rw-r--r--lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c
index cd3f21f60..fb0bee778 100644
--- a/lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c
+++ b/lib/mesa/src/gallium/winsys/svga/drm/vmw_screen_svga.c
@@ -80,8 +80,11 @@ vmw_svga_winsys_buffer_create(struct svga_winsys_screen *sws,
provider = vws->pools.query_fenced;
} else if (usage == SVGA_BUFFER_USAGE_SHADER) {
provider = vws->pools.mob_shader_slab_fenced;
- } else
+ } else {
+ if (size > VMW_GMR_POOL_SIZE)
+ return NULL;
provider = vws->pools.gmr_fenced;
+ }
assert(provider);
buffer = provider->create_buffer(provider, size, &desc.pb_desc);