diff options
author | Brian Paul <[email protected]> | 2019-05-20 06:24:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2019-05-29 13:59:23 -0600 |
commit | c71ca65405e677ac65d176cd4d6138923df6cd56 (patch) | |
tree | 3bde91c431a6e4716c4f9dd586d5ea4378d4dbb6 /src/gallium/drivers/svga | |
parent | 6892d2b94a546ec35c259b98a014107d83986227 (diff) |
svga: clamp max_const_buffers to SVGA_MAX_CONST_BUFS
In case the device reports 15 (or more) buffers.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 92f51ebe919..5300fada9ff 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -1079,7 +1079,8 @@ svga_screen_create(struct svga_winsys_screen *sws) /* Maximum number of constant buffers */ svgascreen->max_const_buffers = get_uint_cap(sws, SVGA3D_DEVCAP_DX_MAX_CONSTANT_BUFFERS, 1); - assert(svgascreen->max_const_buffers <= SVGA_MAX_CONST_BUFS); + svgascreen->max_const_buffers = MIN2(svgascreen->max_const_buffers, + SVGA_MAX_CONST_BUFS); screen->is_format_supported = svga_is_dx_format_supported; } |