swr: Report format max_samples=1 to maintain support for "fake" msaa.
authorCherniak, Bruce <bruce.cherniak@intel.com>
Fri, 25 Aug 2017 19:59:13 +0000 (14:59 -0500)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 1 Sep 2017 16:23:16 +0000 (11:23 -0500)
commit43145bbf097dd0c973bb19afd9227cf3ce75f52a
treeff3c718b6114cd571a657f8900430a4fce3c1830
parent4d6c23ee838040e3ca7d2acb54c94656d827ed34
swr: Report format max_samples=1 to maintain support for "fake" msaa.

Accompanying patch "st/mesa: only try to create 1x msaa surfaces for
'fake' msaa" requires driver to report max_samples=1 to enable "fake"
msaa. Previously, 0 and 1 were treated equivalently in st_init_extensions()
and either could enable "fake" msaa.

This patch raises the swr default msaa_max_count from 0 to 1, so that
swr_is_format_supported will report max_samples=1.

Real msaa can still be enabled by exporting SWR_MSAA_MAX_COUNT with a
pow2 value between 2 and 16.

This patch is necessary to prevent an OpenSWR regression resulting from
the st/mesa patch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102038
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-By: George Kyriazis <george.kyriazis@intel.com>
src/gallium/drivers/swr/swr_screen.cpp