From 73c850fb9a75cba07dbd45572d7a060a7bdb24bc Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Wed, 15 Nov 2017 22:21:22 -0800 Subject: [PATCH] svga: check sample count devcaps Check sample count devcaps from the svga device to determine the supported sample counts. Reviewed-by: Brian Paul --- src/gallium/drivers/svga/svga_screen.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.30.2