From: Charmaine Lee Date: Thu, 16 Nov 2017 06:21:22 +0000 (-0800) Subject: svga: check sample count devcaps X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=73c850fb9a75cba07dbd45572d7a060a7bdb24bc;p=mesa.git svga: check sample count devcaps Check sample count devcaps from the svga device to determine the supported sample counts. Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index d5fae6c57b5..f376367f6e2 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -1058,6 +1058,14 @@ svga_screen_create(struct svga_winsys_screen *sws) svgascreen->maxPointSize = 80.0F; svgascreen->max_color_buffers = SVGA3D_DX_MAX_RENDER_TARGETS; + /* Multisample samples per pixel */ + if (sws->have_sm4_1 && debug_get_bool_option("SVGA_MSAA", TRUE)) { + if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_2X, FALSE)) + svgascreen->ms_samples |= 1 << 1; + if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_4X, FALSE)) + svgascreen->ms_samples |= 1 << 3; + } + /* Maximum number of constant buffers */ svgascreen->max_const_buffers = get_uint_cap(sws, SVGA3D_DEVCAP_DX_MAX_CONSTANT_BUFFERS, 1);