summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.h
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-03-07 15:02:31 +0100
committerChristian König <[email protected]>2013-03-19 13:38:32 +0100
commit21190fbd56ec2f12dc5a1bf1d9fc32d507e8f0a3 (patch)
tree9e871eed177a4ac7143946efbe69b2f5ec48ffe3 /src/gallium/auxiliary/tgsi/tgsi_ureg.h
parent16caeff2a5cc1237d30de9487b48b1cd775d9ae1 (diff)
tgsi: use separate structure for indirect address v2
To further improve the optimization of source and destination indirect addressing we need the ability to store a reference to the declaration of the addressed operands. Since most of the fields in tgsi_src_register doesn't apply for an indirect addressing operand replace it with a separate tgsi_ind_register structure and so make room for extra information. v2: rename Declaration to ArrayID, put the ArrayID into () instead of [] Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_ureg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index cd140de6ba9..be99ae0f048 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -62,6 +62,7 @@ struct ureg_src
int IndirectIndex : 16; /* SINT */
int DimensionIndex : 16; /* SINT */
int DimIndIndex : 16; /* SINT */
+ unsigned ArrayID : 10; /* UINT */
};
/* Very similar to a tgsi_dst_register, removing unsupported fields
@@ -84,6 +85,7 @@ struct ureg_dst
int Index : 16; /* SINT */
int IndirectIndex : 16; /* SINT */
int IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */
+ unsigned ArrayID : 10; /* UINT */
};
struct pipe_context;
@@ -1129,6 +1131,7 @@ ureg_dst( struct ureg_src src )
dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
dst.PredSwizzleW = TGSI_SWIZZLE_W;
dst.Index = src.Index;
+ dst.ArrayID = src.ArrayID;
return dst;
}
@@ -1157,6 +1160,7 @@ ureg_src_register(unsigned file,
src.DimIndFile = TGSI_FILE_NULL;
src.DimIndIndex = 0;
src.DimIndSwizzle = 0;
+ src.ArrayID = 0;
return src;
}
@@ -1184,6 +1188,7 @@ ureg_src( struct ureg_dst dst )
src.DimIndFile = TGSI_FILE_NULL;
src.DimIndIndex = 0;
src.DimIndSwizzle = 0;
+ src.ArrayID = dst.ArrayID;
return src;
}
@@ -1208,6 +1213,7 @@ ureg_dst_undef( void )
dst.PredSwizzleZ = TGSI_SWIZZLE_Z;
dst.PredSwizzleW = TGSI_SWIZZLE_W;
dst.Index = 0;
+ dst.ArrayID = 0;
return dst;
}
@@ -1235,6 +1241,7 @@ ureg_src_undef( void )
src.DimIndFile = TGSI_FILE_NULL;
src.DimIndIndex = 0;
src.DimIndSwizzle = 0;
+ src.ArrayID = 0;
return src;
}