<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Discussed with Bruce.</div>
<div class=""><br class="">
</div>
<div class="">Reviewed-By: George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>></div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Aug 31, 2017, at 11:09 PM, Brian Paul <<a href="mailto:brianp@vmware.com" class="">brianp@vmware.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">I'm not familiar with this driver so I'll give this an<br class="">
<br class="">
Acked-by: Brian Paul <<a href="mailto:brianp@vmware.com" class="">brianp@vmware.com</a>><br class="">
<br class="">
Roland gave me his R-b for the state tracker patch off-list.<br class="">
<br class="">
I'll commit that and you can take care of this one. Feel free to close the bug then.<br class="">
<br class="">
-Brian<br class="">
<br class="">
<br class="">
On 08/25/2017 01:59 PM, Bruce Cherniak wrote:<br class="">
<blockquote type="cite" class="">Accompanying patch "st/mesa: only try to create 1x msaa surfaces for<br class="">
'fake' msaa" requires driver to report max_samples=1 to enable "fake"<br class="">
msaa. Previously, 0 and 1 were treated equivalently in st_init_extensions()<br class="">
and either could enable "fake" msaa.<br class="">
<br class="">
This patch raises the swr default msaa_max_count from 0 to 1, so that<br class="">
swr_is_format_supported will report max_samples=1.<br class="">
<br class="">
Real msaa can still be enabled by exporting SWR_MSAA_MAX_COUNT with a<br class="">
pow2 value between 2 and 16.<br class="">
<br class="">
This patch is necessary to prevent an OpenSWR regression resulting from<br class="">
the st/mesa patch.<br class="">
<br class="">
Bugzilla: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D102038&d=DwIBAg&c=uilaK90D4TOVoH58JNXRgQ&r=Ie7_encNUsqxbSRbqbNgofw0ITcfE8JKfaUjIQhncGA&m=qdD02tm0IRZ3cDM-14sDyg5PjXgN7HpvqxwdIKPKG_0&s=Lfh53G7s15bwea6KD_n-r5t38aWcMLmz8Dp-k0TfKbA&e=" class="">
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D102038&d=DwIBAg&c=uilaK90D4TOVoH58JNXRgQ&r=Ie7_encNUsqxbSRbqbNgofw0ITcfE8JKfaUjIQhncGA&m=qdD02tm0IRZ3cDM-14sDyg5PjXgN7HpvqxwdIKPKG_0&s=Lfh53G7s15bwea6KD_n-r5t38aWcMLmz8Dp-k0TfKbA&e=</a><br class="">
---<br class="">
src/gallium/drivers/swr/swr_screen.cpp | 22 +++++++++++-----------<br class="">
1 file changed, 11 insertions(+), 11 deletions(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp<br class="">
index 3287bc6fee..cc8d9955b8 100644<br class="">
--- a/src/gallium/drivers/swr/swr_screen.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_screen.cpp<br class="">
@@ -255,13 +255,13 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)<br class="">
return 1;<br class="">
<br class="">
/* MSAA support<br class="">
- * If user has explicitly set max_sample_count = 0 (via SWR_MSAA_MAX_COUNT)<br class="">
- * then disable all MSAA support and go back to old caps. */<br class="">
+ * If user has explicitly set max_sample_count = 1 (via SWR_MSAA_MAX_COUNT)<br class="">
+ * then disable all MSAA support and go back to old (FAKE_SW_MSAA) caps. */<br class="">
case PIPE_CAP_TEXTURE_MULTISAMPLE:<br class="">
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:<br class="">
- return swr_screen(screen)->msaa_max_count ? 1 : 0;<br class="">
+ return (swr_screen(screen)->msaa_max_count > 1) ? 1 : 0;<br class="">
case PIPE_CAP_FAKE_SW_MSAA:<br class="">
- return swr_screen(screen)->msaa_max_count ? 0 : 1;<br class="">
+ return (swr_screen(screen)->msaa_max_count > 1) ? 0 : 1;<br class="">
<br class="">
/* unsupported features */<br class="">
case PIPE_CAP_ANISOTROPIC_FILTER:<br class="">
@@ -1079,22 +1079,22 @@ swr_validate_env_options(struct swr_screen *screen)<br class="">
screen->client_copy_limit = client_copy_limit;<br class="">
<br class="">
/* XXX msaa under development, disable by default for now */<br class="">
- screen->msaa_max_count = 0; /* was SWR_MAX_NUM_MULTISAMPLES; */<br class="">
+ screen->msaa_max_count = 1; /* was SWR_MAX_NUM_MULTISAMPLES; */<br class="">
<br class="">
/* validate env override values, within range and power of 2 */<br class="">
- int msaa_max_count = debug_get_num_option("SWR_MSAA_MAX_COUNT", 0);<br class="">
- if (msaa_max_count) {<br class="">
- if ((msaa_max_count < 0) || (msaa_max_count > SWR_MAX_NUM_MULTISAMPLES)<br class="">
+ int msaa_max_count = debug_get_num_option("SWR_MSAA_MAX_COUNT", 1);<br class="">
+ if (msaa_max_count != 1) {<br class="">
+ if ((msaa_max_count < 1) || (msaa_max_count > SWR_MAX_NUM_MULTISAMPLES)<br class="">
|| !util_is_power_of_two(msaa_max_count)) {<br class="">
fprintf(stderr, "SWR_MSAA_MAX_COUNT invalid: %d\n", msaa_max_count);<br class="">
fprintf(stderr, "must be power of 2 between 1 and %d" \<br class="">
- " (or 0 to disable msaa)\n",<br class="">
+ " (or 1 to disable msaa)\n",<br class="">
SWR_MAX_NUM_MULTISAMPLES);<br class="">
- msaa_max_count = 0;<br class="">
+ msaa_max_count = 1;<br class="">
}<br class="">
<br class="">
fprintf(stderr, "SWR_MSAA_MAX_COUNT: %d\n", msaa_max_count);<br class="">
- if (!msaa_max_count)<br class="">
+ if (msaa_max_count == 1)<br class="">
fprintf(stderr, "(msaa disabled)\n");<br class="">
<br class="">
screen->msaa_max_count = msaa_max_count;<br class="">
<br class="">
</blockquote>
<br class="">
_______________________________________________<br class="">
mesa-dev mailing list<br class="">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="">mesa-dev@lists.freedesktop.org</a><br class="">
https://lists.freedesktop.org/mailman/listinfo/mesa-dev<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>