On 02.08.2012 07:51, Michel Dänzer wrote:
On Mit, 2012-08-01 at 23:28 +0200, Christian König wrote:
Using the writemask in the sampler results in packet
VGPRS.
What does that mean?
The instructions with a destination mask are packing their results, e.g.
when you sample RGBA you get:
R in VGPR0
G in VGPR1
B in VGPR2
A in VGPR3
But when you for example mask G&B you get:
R in VGPR0
G masked
B masked
A in VGPR1
So your image sample instruction is only writing 2 VGPRS then.
[SNIP]
Couldn't this incorrectly clobber components of the destination which
were supposed to be masked?
No cause it is just an optimization of not fetching unwanted components,
and not masking anything.
We need to teach LLVM that IMAGE_SAMPLE instructions can return anything
between 1 and 4 components and mask the unwanted and unused ones.
Unfortunately I have not the slightest idea how to do that.
Christian.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev