summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_mesa_to_tgsi.c
diff options
context:
space:
mode:
authorMichal Krol <michal@tungstengraphics.com>2008-08-18 22:51:15 +0200
committerMichal Krol <michal@tungstengraphics.com>2008-08-19 00:44:15 +0200
commit3eeaa943e264d9c61abfe5f4cf6351fdba0be4fd (patch)
tree6a7dccd789f0cc37f9938cfad8518a6cf588246f /src/mesa/state_tracker/st_mesa_to_tgsi.c
parent81dbc31f8b21aecdb91802dd4481057bd670f227 (diff)
st: Translate address register declaration.
Diffstat (limited to 'src/mesa/state_tracker/st_mesa_to_tgsi.c')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 372e4672f6..bcb23eefc3 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -610,6 +610,19 @@ make_temp_decl(
return decl;
}
+static struct tgsi_full_declaration
+make_addr_decl(
+ GLuint start_index,
+ GLuint end_index )
+{
+ struct tgsi_full_declaration decl;
+
+ decl = tgsi_default_full_declaration();
+ decl.Declaration.File = TGSI_FILE_ADDRESS;
+ decl.DeclarationRange.First = start_index;
+ decl.DeclarationRange.Last = end_index;
+ return decl;
+}
static struct tgsi_full_declaration
make_sampler_decl(GLuint index)
@@ -828,6 +841,21 @@ tgsi_translate_mesa_program(
}
}
+ /* Address register.
+ */
+ if (program->NumAddressRegs > 0) {
+ struct tgsi_full_declaration fulldecl;
+
+ assert( program->NumAddressRegs == 1 );
+
+ fulldecl = make_addr_decl( 0, 0 );
+ ti += tgsi_build_full_declaration(
+ &fulldecl,
+ &tokens[ti],
+ header,
+ maxTokens - ti );
+ }
+
/* immediates/literals */
memset(immediates, ~0, sizeof(immediates));