<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jan 18, 2017 3:42 AM, "Michel Dänzer" <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On 18/01/17 07:47 AM, Marek Olšák wrote:<br>
> From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
><br>
> ---<br>
> src/gallium/drivers/radeon/<wbr>r600_texture.c | 5 ++++-<br>
> 1 file changed, 4 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/gallium/drivers/radeon/<wbr>r600_texture.c b/src/gallium/drivers/radeon/<wbr>r600_texture.c<br>
> index cba4e7d..971e40a 100644<br>
> --- a/src/gallium/drivers/radeon/<wbr>r600_texture.c<br>
> +++ b/src/gallium/drivers/radeon/<wbr>r600_texture.c<br>
> @@ -1177,21 +1177,24 @@ r600_choose_tiling(struct r600_common_screen *rscreen,<br>
> if (rscreen->chip_class >= SI &&<br>
> (templ->bind & PIPE_BIND_CURSOR))<br>
> return RADEON_SURF_MODE_LINEAR_<wbr>ALIGNED;<br>
><br>
> if (templ->bind & PIPE_BIND_LINEAR)<br>
> return RADEON_SURF_MODE_LINEAR_<wbr>ALIGNED;<br>
><br>
> /* Textures with a very small height are recommended to be linear. */<br>
> if (templ->target == PIPE_TEXTURE_1D ||<br>
> templ->target == PIPE_TEXTURE_1D_ARRAY ||<br>
> - templ->height0 <= 4)<br>
> + templ->height0 == 1 ||<br>
> + /* Assume that the linear alignment has to be 64 texels. */<br>
> + (templ->width0 > 32 &&<br>
> + templ->height0 <= 4))<br>
> return RADEON_SURF_MODE_LINEAR_<wbr>ALIGNED;<br>
<br>
</div>This needs more explanation in the code comment and/or commit log as to<br>
the motivation for / purpose of the change.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Let's drop this patch. It's not correct. A linear pitch is aligned to 64 bytes, not elements. The idea was that a 4x4 32bpp texture could fit in a cache line if it's 1D tiled, and 4 cache lines if if it's linear.</div><div dir="auto"><br></div><div dir="auto">Marek</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#888888"><br>
<br>
--<br>
Earthling Michel Dänzer | <a href="http://www.amd.com" rel="noreferrer" target="_blank">http://www.amd.com</a><br>
Libre software enthusiast | Mesa and X developer<br>
</font></blockquote></div><br></div></div></div>