[Mesa-dev] [PATCH 13/14] i965/vs: Implement EXT_texture_swizzle support for VS texturing.
Eric Anholt
eric at anholt.net
Thu Dec 15 07:51:38 PST 2011
On Wed, 14 Dec 2011 15:11:53 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On 12/13/2011 01:19 PM, Eric Anholt wrote:
> > On Thu, 8 Dec 2011 17:08:04 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
> >> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> >> + if (one_mask) {
> >> + swizzled_result.writemask = one_mask;
> >> + emit(MOV(swizzled_result, src_reg(1.0f)));
> >> + }
> >> }
> >
> > I think this would be wrong for SWIZZLE_ONE of integer textures.
>
> My tests indicate that it works. swizzled_result gets the appropriate
> register type, so this ends up being something like:
>
> mov(8) m4<1>.ywUD 1F { align16 WE_normal 1Q };
>
> and the MOV instruction does the float->int conversion for us.
>
> Is that okay? If not, what would you prefer?
Oh, you're right. I was not thinking correctly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111215/bebd4ca5/attachment.pgp>
More information about the mesa-dev
mailing list