diff options
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r-- | src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c | 19 | ||||
-rw-r--r-- | src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h | 3 |
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 );
|