<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 20/02/17 19:12, Jason Ekstrand
wrote:<br>
</div>
<blockquote
cite="mid:CAOFGe95DHDFwth4it_OHc5+AF2WiVk6=k9boWzzwoM6Yg_4SqQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Mon, Feb 20, 2017 at 10:33 AM,
Lionel Landwerlin <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:lionel.g.landwerlin@intel.com"
target="_blank">lionel.g.landwerlin@intel.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div class="gmail-HOEnZb">
<div class="gmail-h5">On 20/02/17 18:09, Jason Ekstrand
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
From: Lionel Landwerlin <<a
moz-do-not-send="true"
href="mailto:lionel.g.landwerlin@intel.com"
target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br>
<br>
v3 (Jason Ekstrand): Add a comment explaining why<br>
<br>
Signed-off-by: Lionel Landwerlin <<a
moz-do-not-send="true"
href="mailto:lionel.g.landwerlin@intel.com"
target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br>
Reviewed-by: Jason Ekstrand <<a
moz-do-not-send="true"
href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
---<br>
src/intel/isl/isl.c | 10 ++++++++++<br>
1 file changed, 10 insertions(+)<br>
<br>
diff --git a/src/intel/isl/isl.c
b/src/intel/isl/isl.c<br>
index 1a47da5..6979063 100644<br>
--- a/src/intel/isl/isl.c<br>
+++ b/src/intel/isl/isl.c<br>
@@ -1417,6 +1417,16 @@ isl_surf_get_mcs_surf(const
struct isl_device *dev,<br>
assert(surf->levels == 1);<br>
assert(surf->logical_level0_p<wbr>x.depth ==
1);<br>
+ /* The "Auxiliary Surface Pitch" field in
RENDER_SURFACE_STATE is only 9<br>
+ * bits which means the maximum pitch of a
compression surface is 512<br>
+ * tiles or 64KB (since MCS is always Y-tiled).
Since a 16x MCS buffer is<br>
+ * 64bpp, this gives us a maximum width of 8192
pixels. We can create<br>
+ * larger multisampled surfaces, we just can't
compress them. For 2x, 4x,<br>
+ * and 8x, we have enough room for the full 16k
supported by the hardware.<br>
+ */<br>
+ if (surf->samples == 16 &&
surf->width > 8192)<br>
+ return false;<br>
+<br>
</blockquote>
<br>
</div>
</div>
I was about to write something like this :<br>
<br>
struct isl_tile_info tile_info;<br>
isl_surf_get_tile_info(dev, surf, &tile_info);<br>
if ((surf->row_pitch /
tile_info.phys_extent_B.width) > 512)<br>
return false;<br>
</blockquote>
<div><br>
</div>
<div>That would work too and it is a bit more general.
However, ISL currently doesn't touch the isl_surf if
creation fails. I wouldn't mind keeping that. Also, I
like that the end result of the restriction is clearly
spelled out with the old check. I can't say that I care
all that much one way or the other so long as both the
effect (16x 16k surfaces not working) and the reason
(pitch) are documented.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Whichever :)<br>
<br>
Reviewed-by: Lionel Landwerlin <a class="moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com"><lionel.g.landwerlin@intel.com></a><br>
<br>
<blockquote
cite="mid:CAOFGe95DHDFwth4it_OHc5+AF2WiVk6=k9boWzzwoM6Yg_4SqQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div class="gmail-HOEnZb">
<div class="gmail-h5">
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
enum isl_format mcs_format;<br>
switch (surf->samples) {<br>
case 2: mcs_format = ISL_FORMAT_MCS_2X;
break;<br>
</blockquote>
<br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>