summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2017-11-15 22:21:22 -0800
committerBrian Paul <[email protected]>2018-09-10 13:07:30 -0600
commit73c850fb9a75cba07dbd45572d7a060a7bdb24bc (patch)
treec9fee691e2e573996f54b64ceda67a1447e388b1 /src/gallium/drivers
parentafacde35531b74ccb250c65d298678b6993a339d (diff)
svga: check sample count devcaps
Check sample count devcaps from the svga device to determine the supported sample counts. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c8
1 files changed, 8 insertions, 0 deletions
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);