summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-03-07 16:52:54 +0100
committerChristian König <[email protected]>2013-03-19 13:38:32 +0100
commitd3e07bed90d6b94ac37a7f48417bf8962408fa47 (patch)
tree7259b5e861e71e98d09f9c667133a203e12d7602 /src/gallium/auxiliary
parentaffdff230b8207a4344cebbdc0acf0fbf67c8fa3 (diff)
tgsi: remove TGSI_FILE_(IMMEDIATE|TEMP)_ARRAY
Nobody seems to be using it, and only nv50 had a partial implementation. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c19
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c38
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c41
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.h2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.c11
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.h6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_sanity.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_strings.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c43
9 files changed, 0 insertions, 164 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index cb7b9b2cccc..33cbbd8ca65 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -336,7 +336,6 @@ tgsi_default_full_declaration( void )
full_declaration.Range = tgsi_default_declaration_range();
full_declaration.Semantic = tgsi_default_declaration_semantic();
full_declaration.Interp = tgsi_default_declaration_interp();
- full_declaration.ImmediateData.u = NULL;
full_declaration.Resource = tgsi_default_declaration_resource();
full_declaration.SamplerView = tgsi_default_declaration_sampler_view();
@@ -425,24 +424,6 @@ tgsi_build_full_declaration(
header );
}
- if (full_decl->Declaration.File == TGSI_FILE_IMMEDIATE_ARRAY) {
- unsigned i, j;
- union tgsi_immediate_data *data;
-
- for (i = 0; i <= dr->Last; ++i) {
- for (j = 0; j < 4; ++j) {
- unsigned idx = i*4 + j;
- if (maxsize <= size)
- return 0;
- data = (union tgsi_immediate_data *) &tokens[size];
- ++size;
-
- *data = full_decl->ImmediateData.u[idx];
- declaration_grow( declaration, header );
- }
- }
- }
-
if (full_decl->Declaration.File == TGSI_FILE_RESOURCE) {
struct tgsi_declaration_resource *dr;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 3e6f76a4d6b..177be0f30c2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -347,44 +347,6 @@ iter_declaration(
TXT( ", INVARIANT" );
}
-
- if (decl->Declaration.File == TGSI_FILE_IMMEDIATE_ARRAY) {
- unsigned i;
- char range_indent[4];
-
- TXT(" {");
-
- if (decl->Range.Last < 10)
- range_indent[0] = '\0';
- else if (decl->Range.Last < 100) {
- range_indent[0] = ' ';
- range_indent[1] = '\0';
- } else if (decl->Range.Last < 1000) {
- range_indent[0] = ' ';
- range_indent[1] = ' ';
- range_indent[2] = '\0';
- } else {
- range_indent[0] = ' ';
- range_indent[1] = ' ';
- range_indent[2] = ' ';
- range_indent[3] = '\0';
- }
-
- dump_imm_data(iter, decl->ImmediateData.u,
- 4, TGSI_IMM_FLOAT32);
- for(i = 1; i <= decl->Range.Last; ++i) {
- /* indent by strlen of:
- * "DCL IMMX[0..1] {" */
- CHR('\n');
- TXT( " " );
- TXT( range_indent );
- dump_imm_data(iter, decl->ImmediateData.u + i,
- 4, TGSI_IMM_FLOAT32);
- }
-
- TXT(" }");
- }
-
EOL();
return TRUE;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 3df3ac3500f..1af239507d4 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -749,19 +749,6 @@ tgsi_exec_machine_bind_shader(
++mach->NumOutputs;
}
}
- if (parse.FullToken.FullDeclaration.Declaration.File ==
- TGSI_FILE_IMMEDIATE_ARRAY) {
- unsigned reg;
- struct tgsi_full_declaration *decl =
- &parse.FullToken.FullDeclaration;
- debug_assert(decl->Range.Last < TGSI_EXEC_NUM_IMMEDIATES);
- for (reg = decl->Range.First; reg <= decl->Range.Last; ++reg) {
- for( i = 0; i < 4; i++ ) {
- int idx = reg * 4 + i;
- mach->ImmArray[reg][i] = decl->ImmediateData.u[idx].Float;
- }
- }
- }
memcpy(declarations + numDeclarations,
&parse.FullToken.FullDeclaration,
sizeof(declarations[0]));
@@ -1116,16 +1103,6 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
}
break;
- case TGSI_FILE_TEMPORARY_ARRAY:
- for (i = 0; i < TGSI_QUAD_SIZE; i++) {
- assert(index->i[i] < TGSI_EXEC_NUM_TEMPS);
- assert(index2D->i[i] < TGSI_EXEC_NUM_TEMP_ARRAYS);
-
- chan->u[i] =
- mach->TempArray[index2D->i[i]][index->i[i]].xyzw[swizzle].u[i];
- }
- break;
-
case TGSI_FILE_IMMEDIATE:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
assert(index->i[i] >= 0 && index->i[i] < (int)mach->ImmLimit);
@@ -1135,14 +1112,6 @@ fetch_src_file_channel(const struct tgsi_exec_machine *mach,
}
break;
- case TGSI_FILE_IMMEDIATE_ARRAY:
- for (i = 0; i < TGSI_QUAD_SIZE; i++) {
- assert(index2D->i[i] == 0);
-
- chan->f[i] = mach->ImmArray[index->i[i]][swizzle];
- }
- break;
-
case TGSI_FILE_ADDRESS:
for (i = 0; i < TGSI_QUAD_SIZE; i++) {
assert(index->i[i] >= 0);
@@ -1504,16 +1473,6 @@ store_dest(struct tgsi_exec_machine *mach,
dst = &mach->Temps[offset + index].xyzw[chan_index];
break;
- case TGSI_FILE_TEMPORARY_ARRAY:
- index = reg->Register.Index;
- assert( index < TGSI_EXEC_NUM_TEMPS );
- assert( index2D.i[0] < TGSI_EXEC_NUM_TEMP_ARRAYS );
- /* XXX we use index2D.i[0] here but somehow we might
- * end up with someone trying to store indirectly in
- * different buffers */
- dst = &mach->TempArray[index2D.i[0]][offset + index].xyzw[chan_index];
- break;
-
case TGSI_FILE_ADDRESS:
index = reg->Register.Index;
dst = &mach->Addrs[index].xyzw[chan_index];
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index ef1fa8247f1..b14fa2e19a5 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -141,7 +141,6 @@ struct tgsi_sampler
#define TGSI_EXEC_NUM_TEMPS 4096
#define TGSI_EXEC_NUM_IMMEDIATES 256
-#define TGSI_EXEC_NUM_TEMP_ARRAYS 8
/*
* Locations of various utility registers (_I = Index, _C = Channel)
@@ -269,7 +268,6 @@ struct tgsi_exec_machine
*/
struct tgsi_exec_vector Temps[TGSI_EXEC_NUM_TEMPS +
TGSI_EXEC_NUM_TEMP_EXTRAS];
- struct tgsi_exec_vector TempArray[TGSI_EXEC_NUM_TEMP_ARRAYS][TGSI_EXEC_NUM_TEMPS];
float Imms[TGSI_EXEC_NUM_IMMEDIATES][4];
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c
index 45c5c41ec82..720d68d1f22 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c
@@ -121,17 +121,6 @@ tgsi_parse_token(
next_token( ctx, &decl->Semantic );
}
- if (decl->Declaration.File == TGSI_FILE_IMMEDIATE_ARRAY) {
- unsigned i, j;
- decl->ImmediateData.u = (union tgsi_immediate_data*)
- &ctx->Tokens[ctx->Position];
- for (i = 0; i <= decl->Range.Last; ++i) {
- for (j = 0; j < 4; ++j) {
- ctx->Position++;
- }
- }
- }
-
if (decl->Declaration.File == TGSI_FILE_RESOURCE) {
next_token(ctx, &decl->Resource);
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index 3f8bf99e3c1..78210ed7219 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h
@@ -57,11 +57,6 @@ struct tgsi_full_src_register
struct tgsi_src_register DimIndirect;
};
-struct tgsi_immediate_array_data
-{
- union tgsi_immediate_data *u;
-};
-
struct tgsi_full_declaration
{
struct tgsi_declaration Declaration;
@@ -69,7 +64,6 @@ struct tgsi_full_declaration
struct tgsi_declaration_dimension Dim;
struct tgsi_declaration_interp Interp;
struct tgsi_declaration_semantic Semantic;
- struct tgsi_immediate_array_data ImmediateData;
struct tgsi_declaration_resource Resource;
struct tgsi_declaration_sampler_view SamplerView;
};
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index 509c5346837..8a21e56f191 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -257,8 +257,6 @@ static const char *file_names[TGSI_FILE_COUNT] =
"IMM",
"PRED",
"SV",
- "IMMX",
- "TEMPX",
"RES"
};
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index 70f997b3c9e..5c92e9a1001 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -52,8 +52,6 @@ const char *tgsi_file_names[TGSI_FILE_COUNT] =
"IMM",
"PRED",
"SV",
- "IMMX",
- "TEMPX",
"RES",
"SVIEW"
};
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 5abcb456387..7d580e6e3d8 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1084,7 +1084,6 @@ static boolean parse_declaration( struct translate_ctx *ctx )
const char *cur, *cur2;
uint advance;
boolean is_vs_input;
- boolean is_imm_array;
if (!eat_white( &ctx->cur )) {
report_error( ctx, "Syntax error" );
@@ -1112,7 +1111,6 @@ static boolean parse_declaration( struct translate_ctx *ctx )
is_vs_input = (file == TGSI_FILE_INPUT &&
ctx->processor == TGSI_PROCESSOR_VERTEX);
- is_imm_array = (file == TGSI_FILE_IMMEDIATE_ARRAY);
cur = ctx->cur;
eat_opt_white( &cur );
@@ -1264,44 +1262,6 @@ static boolean parse_declaration( struct translate_ctx *ctx )
}
}
}
- } else if (is_imm_array) {
- unsigned i;
- union tgsi_immediate_data *vals_itr;
- /* we have our immediate data */
- if (*cur != '{') {
- report_error( ctx, "Immediate array without data" );
- return FALSE;
- }
- ++cur;
- ctx->cur = cur;
-
- decl.ImmediateData.u =
- MALLOC(sizeof(union tgsi_immediate_data) * 4 *
- (decl.Range.Last + 1));
- vals_itr = decl.ImmediateData.u;
- for (i = 0; i <= decl.Range.Last; ++i) {
- if (!parse_immediate_data(ctx, TGSI_IMM_FLOAT32, vals_itr)) {
- FREE(decl.ImmediateData.u);
- return FALSE;
- }
- vals_itr += 4;
- eat_opt_white( &ctx->cur );
- if (*ctx->cur != ',') {
- if (i != decl.Range.Last) {
- report_error( ctx, "Not enough data in immediate array!" );
- FREE(decl.ImmediateData.u);
- return FALSE;
- }
- } else
- ++ctx->cur;
- }
- eat_opt_white( &ctx->cur );
- if (*ctx->cur != '}') {
- FREE(decl.ImmediateData.u);
- report_error( ctx, "Immediate array data missing closing '}'" );
- return FALSE;
- }
- ++ctx->cur;
}
cur = ctx->cur;
@@ -1332,9 +1292,6 @@ static boolean parse_declaration( struct translate_ctx *ctx )
ctx->header,
(uint) (ctx->tokens_end - ctx->tokens_cur) );
- if (is_imm_array)
- FREE(decl.ImmediateData.u);
-
if (advance == 0)
return FALSE;
ctx->tokens_cur += advance;