mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 14:00:16 +01:00
svga: clamp max_const_buffers to SVGA_MAX_CONST_BUFS
In case the device reports 15 (or more) buffers. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
6892d2b94a
commit
c71ca65405
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue