[Mesa-dev] [PATCH 00/10] glsl: Implement varying packing.
Aras Pranckevicius
aras at unity3d.com
Wed Dec 12 12:44:18 PST 2012
> 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.
--
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121212/868647b4/attachment.html>
More information about the mesa-dev
mailing list