<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div>Not sure if relevant for Mesa, but e.g. on PowerVR SGX it's really bad to pack two vec2 texture coordinates into a single vec4. That's because var.xy texture read can be "prefetched", whereas <a href="http://var.zw" target="_blank">var.zw</a> texture read is not prefetched (essentially treated as a dependent texture read), and often causes stalls in the shader execution.</div>
</div></blockquote><div><br></div></div><div>Interesting--I had not thought of that possibility. On i965 all texture reads have to be done explicitly by the fragment shader (there is no prefetching IIRC), so this penalty doesn't apply. Does anyone know if a penalty like this exists in any of Mesa's other back-ends?</div>
</div></div></blockquote><div><br></div><div>From what I know, it's only PowerVR SGX that is really <i>seriously </i>affected by this. On some other GPUs swizzled texture instructions cost an extra MOV and possibly count against dependent read limit - both not ideal, but not a big deal. On SGX, however, the swizzled texture loads cause texture prefetch to not happen at all, which usually stalls the shader for quite some time (SGX prefetches "regular" texture loads, but doesn't have good latency hiding for dependent or swizzled texture loads).</div>
</div><div><br></div>Anyway, if Mesa does not have (or is not planning to) have a backend for SGX, then probably not a big deal.<br><br clear="all"><div><br></div>-- <br>Aras Pranckevičius<br>work: <a href="http://unity3d.com">http://unity3d.com</a><br>
home: <a href="http://aras-p.info">http://aras-p.info</a><br>
<div><br></div>