summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/tgsi
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-09-21 10:56:32 -0600
committerBrian <[email protected]>2007-09-21 11:14:49 -0600
commit9f96c5d619a478a61c809e88ef53e59005471054 (patch)
tree8aa23af420066f6b20e1e3b57275f9142599a21a /src/mesa/pipe/tgsi
parentf38881c542a6e96ba45f185e372940cbb183647d (diff)
pass vs output semantics to tgsi_mesa_compile_vp_program() to generate output DECs
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c19
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h3
2 files changed, 20 insertions, 2 deletions
diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
index ea6716f1a21..8a3fda2c637 100644
--- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
+++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c
@@ -686,7 +686,10 @@ tgsi_mesa_compile_vp_program(
const GLuint inputMapping[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
+ GLuint numOutputs,
const GLuint outputMapping[],
+ const ubyte outputSemanticName[],
+ const ubyte outputSemanticIndex[],
struct tgsi_token *tokens,
GLuint maxTokens)
{
@@ -705,8 +708,7 @@ tgsi_mesa_compile_vp_program(
ti = 3;
- /* XXX todo: input/output declarations
- */
+ /* input decls */
for (i = 0; i < numInputs; i++) {
struct tgsi_full_declaration fulldecl;
fulldecl = make_input_decl(i,
@@ -720,6 +722,19 @@ tgsi_mesa_compile_vp_program(
maxTokens - ti );
}
+ /* output decls */
+ for (i = 0; i < numOutputs; i++) {
+ struct tgsi_full_declaration fulldecl;
+ fulldecl = make_frag_output_decl(i,
+ outputSemanticName[i],
+ outputSemanticIndex[i],
+ TGSI_WRITEMASK_XYZW );
+ ti += tgsi_build_full_declaration(&fulldecl,
+ &tokens[ti],
+ header,
+ maxTokens - ti );
+ }
+
for( i = 0; i < program->Base.NumInstructions; i++ ) {
if( compile_instruction(
diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
index dc020cefaa8..cf85eb9c0b1 100644
--- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
+++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
@@ -26,7 +26,10 @@ tgsi_mesa_compile_vp_program(
const GLuint inputMapping[],
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
+ GLuint numOutputs,
const GLuint outputMapping[],
+ const ubyte outputSemanticName[],
+ const ubyte outputSemanticIndex[],
struct tgsi_token *tokens,
GLuint maxTokens );