summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2008-06-02 11:59:04 +0200
committerMichal Krol <[email protected]>2008-06-02 11:59:04 +0200
commit2c7ae3371b6058988f7f10bf031d630b649f3831 (patch)
tree696df4ea36dbfde4ddb8cd263dd8e7044def416d /src/gallium/auxiliary/tgsi
parent49ed85d6b1cdb74a7985e2d743635c73151bbfdb (diff)
tgsi: Add assertions to the new rule that when an extended swizzle
is used, the simple swizzle must be set to identity.
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_build.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_build.c b/src/gallium/auxiliary/tgsi/util/tgsi_build.c
index 63cc27becc0..18e44b38c24 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_build.c
@@ -628,6 +628,14 @@ tgsi_build_full_instruction(
tgsi_default_src_register_ext_swz() ) ) {
struct tgsi_src_register_ext_swz *src_register_ext_swz;
+ /* Use of the extended swizzle requires the simple swizzle to be identity.
+ */
+ assert( reg->SrcRegister.SwizzleX == TGSI_SWIZZLE_X );
+ assert( reg->SrcRegister.SwizzleY == TGSI_SWIZZLE_Y );
+ assert( reg->SrcRegister.SwizzleZ == TGSI_SWIZZLE_Z );
+ assert( reg->SrcRegister.SwizzleW == TGSI_SWIZZLE_W );
+ assert( reg->SrcRegister.Negate == FALSE );
+
if( maxsize <= size )
return 0;
src_register_ext_swz =