[Mesa-dev] [PATCH 00/10] glsl: Implement varying packing.

Paul Berry stereotype441 at gmail.com
Wed Dec 12 13:14:55 PST 2012

On 12 December 2012 12:44, Aras Pranckevicius <aras at unity3d.com> wrote:

> 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 var.zw texture read is not
>>> prefetched (essentially treated as a dependent texture read), and often
>>> causes stalls in the shader execution.
>> 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?
> From what I know, it's only PowerVR SGX that is really *seriously *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).
> Anyway, if Mesa does not have (or is not planning to) have a backend for
> SGX, then probably not a big deal.

Ok, thanks for the info.  Currently Mesa doesn't have an SGX backend, and
I'm not aware of any plans to make one.  We can certainly make
modifications to the varying packing algorithm if/when plans change.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121212/8a6ace9f/attachment.html>

More information about the mesa-dev mailing list