<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Sorry, yes, I was aware of the updated patch.  What I meant (in not enough words apparently) is that a change like this could affect other users of the core and need to go through full CI.  We’ve run CI on the updated patch and it passes.
<div class=""><br class="">
</div>
<div class="">So, yes, please go ahead and send that one out.  Reviewing it will be quick with testing already done.
<div class="">
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Nov 14, 2016, at 10:50 PM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<p dir="ltr" class="">I think you're aware, but I actually have an updated version of this patch on my branch. Let me know if you want me to send it out.</p>
<p dir="ltr" class="">The issue is that the texture width/height need not be a multiple of the format's block size. However mip sizes are computed based on that unrounded size.</p>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Nov 14, 2016 8:45 PM, "Cherniak, Bruce" <<a href="mailto:bruce.cherniak@intel.com" class="">bruce.cherniak@intel.com</a>> wrote:<br type="attribution" class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We need to run this through CI for all core users.<br class="">
<br class="">
> On Nov 12, 2016, at 5:00 PM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>> wrote:<br class="">
><br class="">
> There's no guarantee that mip width/height will be a multiple of the<br class="">
> compressed block size. Make sure to round up when dividing.<br class="">
><br class="">
> Signed-off-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>><br class="">
> ---<br class="">
><br class="">
> Note - I don't actually need this. An earlier version of my patches needed<br class="">
> something like this. However since it's a real fix, I figured I'd include<br class="">
> it here.<br class="">
><br class="">
> .../drivers/swr/rasterizer/<wbr class="">memory/TilingFunctions.h       | 15 ++++++++++++---<br class="">
> 1 file changed, 12 insertions(+), 3 deletions(-)<br class="">
><br class="">
> diff --git a/src/gallium/drivers/swr/<wbr class="">rasterizer/memory/<wbr class="">TilingFunctions.h b/src/gallium/drivers/swr/<wbr class="">rasterizer/memory/<wbr class="">TilingFunctions.h<br class="">
> index 0694a99..710bfb3 100644<br class="">
> --- a/src/gallium/drivers/swr/<wbr class="">rasterizer/memory/<wbr class="">TilingFunctions.h<br class="">
> +++ b/src/gallium/drivers/swr/<wbr class="">rasterizer/memory/<wbr class="">TilingFunctions.h<br class="">
> @@ -276,7 +276,10 @@ INLINE void ComputeLODOffset1D(<br class="">
>         uint32_t curWidth = baseWidth;<br class="">
>         // translate mip width from pixels to blocks for block compressed formats<br class="">
>         // @note hAlign is already in blocks for compressed formats so no need to convert<br class="">
> -        if (info.isBC) curWidth /= info.bcWidth;<br class="">
> +        if (info.isBC)<br class="">
> +        {<br class="">
> +            curWidth = GFX_ALIGN(curWidth, info.bcWidth) / info.bcWidth;<br class="">
> +        }<br class="">
><br class="">
>         offset = GFX_ALIGN(curWidth, hAlign);<br class="">
>         for (uint32_t l = 1; l < lod; ++l)<br class="">
> @@ -314,7 +317,10 @@ INLINE void ComputeLODOffsetX(<br class="">
>         uint32_t curWidth = baseWidth;<br class="">
>         // convert mip width from pixels to blocks for block compressed formats<br class="">
>         // @note hAlign is already in blocks for compressed formats so no need to convert<br class="">
> -        if (info.isBC) curWidth /= info.bcWidth;<br class="">
> +        if (info.isBC)<br class="">
> +        {<br class="">
> +            curWidth = GFX_ALIGN(curWidth, info.bcWidth) / info.bcWidth;<br class="">
> +        }<br class="">
><br class="">
>         curWidth = std::max<uint32_t>(curWidth >> 1, 1U);<br class="">
>         curWidth = GFX_ALIGN(curWidth, hAlign);<br class="">
> @@ -352,7 +358,10 @@ INLINE void ComputeLODOffsetY(<br class="">
><br class="">
>         // translate mip height from pixels to blocks for block compressed formats<br class="">
>         // @note VAlign is already in blocks for compressed formats so no need to convert<br class="">
> -        if (info.isBC) mipHeight /= info.bcHeight;<br class="">
> +        if (info.isBC)<br class="">
> +        {<br class="">
> +            mipHeight = GFX_ALIGN(mipHeight, info.bcHeight) / info.bcHeight;<br class="">
> +        }<br class="">
><br class="">
>         for (uint32_t l = 1; l <= lod; ++l)<br class="">
>         {<br class="">
> --<br class="">
> 2.7.3<br class="">
><br class="">
> ______________________________<wbr 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="">
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank" class="">
https://lists.freedesktop.org/<wbr class="">mailman/listinfo/mesa-dev</a><br class="">
<br class="">
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>