summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c82
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.h18
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump_c.c32
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.c5
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.h1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.c1
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_util.c53
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_util.h12
8 files changed, 2 insertions, 202 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 98d36f43e4..d45561362d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -687,32 +687,6 @@ tgsi_build_full_instruction(
header );
prev_token = (struct tgsi_token *) src_register;
- if( tgsi_compare_src_register_ext_swz(
- reg->SrcRegisterExtSwz,
- tgsi_default_src_register_ext_swz() ) ) {
- struct tgsi_src_register_ext_swz *src_register_ext_swz;
-
- /* Use of the extended negate requires the simple negate to be identity.
- */
- assert( reg->SrcRegister.Negate == FALSE );
-
- if( maxsize <= size )
- return 0;
- src_register_ext_swz =
- (struct tgsi_src_register_ext_swz *) &tokens[size];
- size++;
-
- *src_register_ext_swz = tgsi_build_src_register_ext_swz(
- reg->SrcRegisterExtSwz.NegateX,
- reg->SrcRegisterExtSwz.NegateY,
- reg->SrcRegisterExtSwz.NegateZ,
- reg->SrcRegisterExtSwz.NegateW,
- prev_token,
- instruction,
- header );
- prev_token = (struct tgsi_token *) src_register_ext_swz;
- }
-
if( tgsi_compare_src_register_ext_mod(
reg->SrcRegisterExtMod,
tgsi_default_src_register_ext_mod() ) ) {
@@ -1025,7 +999,6 @@ tgsi_default_full_src_register( void )
struct tgsi_full_src_register full_src_register;
full_src_register.SrcRegister = tgsi_default_src_register();
- full_src_register.SrcRegisterExtSwz = tgsi_default_src_register_ext_swz();
full_src_register.SrcRegisterExtMod = tgsi_default_src_register_ext_mod();
full_src_register.SrcRegisterInd = tgsi_default_src_register();
full_src_register.SrcRegisterDim = tgsi_default_dimension();
@@ -1034,61 +1007,6 @@ tgsi_default_full_src_register( void )
return full_src_register;
}
-struct tgsi_src_register_ext_swz
-tgsi_default_src_register_ext_swz( void )
-{
- struct tgsi_src_register_ext_swz src_register_ext_swz;
-
- src_register_ext_swz.Type = TGSI_SRC_REGISTER_EXT_TYPE_SWZ;
- src_register_ext_swz.Padding0 = 0;
- src_register_ext_swz.NegateX = 0;
- src_register_ext_swz.NegateY = 0;
- src_register_ext_swz.NegateZ = 0;
- src_register_ext_swz.NegateW = 0;
- src_register_ext_swz.Padding = 0;
- src_register_ext_swz.Extended = 0;
-
- return src_register_ext_swz;
-}
-
-unsigned
-tgsi_compare_src_register_ext_swz(
- struct tgsi_src_register_ext_swz a,
- struct tgsi_src_register_ext_swz b )
-{
- a.Padding = b.Padding = 0;
- a.Extended = b.Extended = 0;
- return compare32(&a, &b);
-}
-
-struct tgsi_src_register_ext_swz
-tgsi_build_src_register_ext_swz(
- unsigned negate_x,
- unsigned negate_y,
- unsigned negate_z,
- unsigned negate_w,
- struct tgsi_token *prev_token,
- struct tgsi_instruction *instruction,
- struct tgsi_header *header )
-{
- struct tgsi_src_register_ext_swz src_register_ext_swz;
-
- assert( negate_x <= 1 );
- assert( negate_y <= 1 );
- assert( negate_z <= 1 );
- assert( negate_w <= 1 );
-
- src_register_ext_swz = tgsi_default_src_register_ext_swz();
- src_register_ext_swz.NegateX = negate_x;
- src_register_ext_swz.NegateY = negate_y;
- src_register_ext_swz.NegateZ = negate_z;
- src_register_ext_swz.NegateW = negate_w;
-
- prev_token->Extended = 1;
- instruction_grow( instruction, header );
-
- return src_register_ext_swz;
-}
struct tgsi_src_register_ext_mod
tgsi_default_src_register_ext_mod( void )
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.h b/src/gallium/auxiliary/tgsi/tgsi_build.h
index 5e0062a96f..9ae1705f6c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.h
@@ -231,24 +231,6 @@ tgsi_build_src_register(
struct tgsi_full_src_register
tgsi_default_full_src_register( void );
-struct tgsi_src_register_ext_swz
-tgsi_default_src_register_ext_swz( void );
-
-unsigned
-tgsi_compare_src_register_ext_swz(
- struct tgsi_src_register_ext_swz a,
- struct tgsi_src_register_ext_swz b );
-
-struct tgsi_src_register_ext_swz
-tgsi_build_src_register_ext_swz(
- unsigned negate_x,
- unsigned negate_y,
- unsigned negate_z,
- unsigned negate_w,
- struct tgsi_token *prev_token,
- struct tgsi_instruction *instruction,
- struct tgsi_header *header );
-
struct tgsi_src_register_ext_mod
tgsi_default_src_register_ext_mod( void );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump_c.c b/src/gallium/auxiliary/tgsi/tgsi_dump_c.c
index 4f59ed22b5..c7dbdb3bd2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump_c.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump_c.c
@@ -163,7 +163,7 @@ static const char *TGSI_TEXTURES[] =
static const char *TGSI_SRC_REGISTER_EXTS[] =
{
- "SRC_REGISTER_EXT_TYPE_SWZ",
+ "",
"SRC_REGISTER_EXT_TYPE_MOD"
};
@@ -546,36 +546,6 @@ dump_instruction_verbose(
}
}
- if( deflt || tgsi_compare_src_register_ext_swz( src->SrcRegisterExtSwz, fs->SrcRegisterExtSwz ) ) {
- EOL();
- TXT( "\nType : " );
- ENM( src->SrcRegisterExtSwz.Type, TGSI_SRC_REGISTER_EXTS );
- if( deflt || fs->SrcRegisterExtSwz.NegateX != src->SrcRegisterExtSwz.NegateX ) {
- TXT( "\nNegateX : " );
- UID( src->SrcRegisterExtSwz.NegateX );
- }
- if( deflt || fs->SrcRegisterExtSwz.NegateY != src->SrcRegisterExtSwz.NegateY ) {
- TXT( "\nNegateY : " );
- UID( src->SrcRegisterExtSwz.NegateY );
- }
- if( deflt || fs->SrcRegisterExtSwz.NegateZ != src->SrcRegisterExtSwz.NegateZ ) {
- TXT( "\nNegateZ : " );
- UID( src->SrcRegisterExtSwz.NegateZ );
- }
- if( deflt || fs->SrcRegisterExtSwz.NegateW != src->SrcRegisterExtSwz.NegateW ) {
- TXT( "\nNegateW : " );
- UID( src->SrcRegisterExtSwz.NegateW );
- }
- if( ignored ) {
- TXT( "\nPadding : " );
- UIX( src->SrcRegisterExtSwz.Padding );
- if( deflt || fs->SrcRegisterExtSwz.Extended != src->SrcRegisterExtSwz.Extended ) {
- TXT( "\nExtended : " );
- UID( src->SrcRegisterExtSwz.Extended );
- }
- }
- }
-
if( deflt || tgsi_compare_src_register_ext_mod( src->SrcRegisterExtMod, fs->SrcRegisterExtMod ) ) {
EOL();
TXT( "\nType : " );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c
index 4870f82b6b..f742c71936 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c
@@ -264,11 +264,6 @@ tgsi_parse_token(
next_token( ctx, &token );
switch( token.Type ) {
- case TGSI_SRC_REGISTER_EXT_TYPE_SWZ:
- copy_token(&inst->FullSrcRegisters[i].SrcRegisterExtSwz,
- &token);
- break;
-
case TGSI_SRC_REGISTER_EXT_TYPE_MOD:
copy_token(&inst->FullSrcRegisters[i].SrcRegisterExtMod,
&token);
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index a26ee5ba86..602131398d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h
@@ -56,7 +56,6 @@ struct tgsi_full_dst_register
struct tgsi_full_src_register
{
struct tgsi_src_register SrcRegister;
- struct tgsi_src_register_ext_swz SrcRegisterExtSwz;
struct tgsi_src_register_ext_mod SrcRegisterExtMod;
struct tgsi_src_register SrcRegisterInd;
struct tgsi_dimension SrcRegisterDim;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 654426a903..8cb574ea43 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -51,7 +51,6 @@ union tgsi_any_token {
struct tgsi_instruction_ext_texture insn_ext_texture;
struct tgsi_instruction_ext_predicate insn_ext_predicate;
struct tgsi_src_register src;
- struct tgsi_src_register_ext_swz src_ext_swz;
struct tgsi_src_register_ext_mod src_ext_mod;
struct tgsi_dimension dim;
struct tgsi_dst_register dst;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c
index 6120a2da94..4dee1be9e8 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -105,50 +105,6 @@ tgsi_util_set_src_register_swizzle(
}
unsigned
-tgsi_util_get_src_register_extnegate(
- const struct tgsi_src_register_ext_swz *reg,
- unsigned component )
-{
- switch( component ) {
- case 0:
- return reg->NegateX;
- case 1:
- return reg->NegateY;
- case 2:
- return reg->NegateZ;
- case 3:
- return reg->NegateW;
- default:
- assert( 0 );
- }
- return 0;
-}
-
-void
-tgsi_util_set_src_register_extnegate(
- struct tgsi_src_register_ext_swz *reg,
- unsigned negate,
- unsigned component )
-{
- switch( component ) {
- case 0:
- reg->NegateX = negate;
- break;
- case 1:
- reg->NegateY = negate;
- break;
- case 2:
- reg->NegateZ = negate;
- break;
- case 3:
- reg->NegateW = negate;
- break;
- default:
- assert( 0 );
- }
-}
-
-unsigned
tgsi_util_get_full_src_register_sign_mode(
const struct tgsi_full_src_register *reg,
unsigned component )
@@ -171,9 +127,7 @@ tgsi_util_get_full_src_register_sign_mode(
unsigned negate;
negate = reg->SrcRegister.Negate;
- if( tgsi_util_get_src_register_extnegate( &reg->SrcRegisterExtSwz, component ) ) {
- negate = !negate;
- }
+
if( reg->SrcRegisterExtMod.Negate ) {
negate = !negate;
}
@@ -194,11 +148,6 @@ tgsi_util_set_full_src_register_sign_mode(
struct tgsi_full_src_register *reg,
unsigned sign_mode )
{
- reg->SrcRegisterExtSwz.NegateX = 0;
- reg->SrcRegisterExtSwz.NegateY = 0;
- reg->SrcRegisterExtSwz.NegateZ = 0;
- reg->SrcRegisterExtSwz.NegateW = 0;
-
switch (sign_mode)
{
case TGSI_UTIL_SIGN_CLEAR:
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.h b/src/gallium/auxiliary/tgsi/tgsi_util.h
index bf3f20ca6c..19ee2e7cf2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.h
@@ -33,7 +33,6 @@ extern "C" {
#endif
struct tgsi_src_register;
-struct tgsi_src_register_ext_swz;
struct tgsi_full_src_register;
void *
@@ -57,17 +56,6 @@ tgsi_util_set_src_register_swizzle(
unsigned swizzle,
unsigned component );
-unsigned
-tgsi_util_get_src_register_extnegate(
- const struct tgsi_src_register_ext_swz *reg,
- unsigned component );
-
-void
-tgsi_util_set_src_register_extnegate(
- struct tgsi_src_register_ext_swz *reg,
- unsigned negate,
- unsigned component );
-
#define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */
#define TGSI_UTIL_SIGN_SET 1 /* Force negative */
#define TGSI_UTIL_SIGN_TOGGLE 2 /* Negate */