<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 8, 2013 at 11:29 AM, Michel Dänzer <span dir="ltr"><<a href="mailto:michel@daenzer.net" target="_blank">michel@daenzer.net</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="im">On Fre, 2013-04-05 at 17:36 -0400, <a href="mailto:j.glisse@gmail.com">j.glisse@gmail.com</a> wrote:<br>
> From: Jerome Glisse <<a href="mailto:jglisse@redhat.com">jglisse@redhat.com</a>><br>
><br>
> Most test pass, issue are with border color and swizzle.<br>
<br>
</div>FWIW, those issues are there with non-compressed formats as well. I'm<br>
afraid we might need to change the hardware border colour depending on<br>
the swizzle.<br></blockquote></div><br></div><div class="gmail_extra">I don't think so. The issue with the swizzled border color seems to be a bad hardware design decision present since r600 rather than a hardware bug. I tried fixing it for older chipsets with no success. I doubt the hw designers fixed this for SI. The problem is the hardware tries to guess what the border color swizzle is from the combined pipe_format+sampler view swizzle combination. You need 2 texture swizzle states in the texture unit for the border color to be swizzled correctly, because texels must be swizzled by the pipe_format swizzle and sampler view swizzle, but the border color must be swizzled by the sampler view only. The main problem is that the hardware internally tries to undo the pipe_format swizzle in a way that just doesn't work. I don't remember the exact swizzles being used by hardware, but I got crazy cases like if I set texture swizzle to ywzx, the border color will be ywyy. There is no way to access those zx components of the border color for that specific swizzling. For some cases, the hardware succeeds in guessing what the border color should be, e.g. if I set texture swizzle to .zyxw, the returned border color will be .xyzw (and that would be correct if the swizzle came from pipe_format, and incorrect if the swizzle came from sampler view).<br>
<br></div><div class="gmail_extra">It was easy with r300, because I could just undo pipe_format swizzling before passing the border color to the hardware.<br></div><div class="gmail_extra"><br>Marek<br></div></div>