Finish up decls for packed fragment program outputs.
This commit is contained in:
@@ -516,7 +516,10 @@ tgsi_mesa_compile_fp_program(
|
|||||||
const ubyte inputSemanticName[],
|
const ubyte inputSemanticName[],
|
||||||
const ubyte inputSemanticIndex[],
|
const ubyte inputSemanticIndex[],
|
||||||
const GLuint interpMode[],
|
const GLuint interpMode[],
|
||||||
|
GLuint numOutputs,
|
||||||
const GLuint outputMapping[],
|
const GLuint outputMapping[],
|
||||||
|
const ubyte outputSemanticName[],
|
||||||
|
const ubyte outputSemanticIndex[],
|
||||||
struct tgsi_token *tokens,
|
struct tgsi_token *tokens,
|
||||||
GLuint maxTokens )
|
GLuint maxTokens )
|
||||||
{
|
{
|
||||||
@@ -580,30 +583,31 @@ tgsi_mesa_compile_fp_program(
|
|||||||
/*
|
/*
|
||||||
* Declare output attributes.
|
* Declare output attributes.
|
||||||
*/
|
*/
|
||||||
assert(
|
for (i = 0; i < numOutputs; i++) {
|
||||||
program->Base.OutputsWritten ==
|
switch (outputSemanticName[i]) {
|
||||||
(program->Base.OutputsWritten & ((1 << FRAG_RESULT_COLR) | (1 << FRAG_RESULT_DEPR))) );
|
case TGSI_SEMANTIC_POSITION:
|
||||||
|
fulldecl = make_output_decl(i,
|
||||||
fulldecl = make_output_decl(
|
TGSI_SEMANTIC_POSITION, 0, /* Z / Depth */
|
||||||
0,
|
TGSI_WRITEMASK_Z );
|
||||||
TGSI_SEMANTIC_POSITION, 0, /* Z / Depth */
|
ti += tgsi_build_full_declaration(
|
||||||
TGSI_WRITEMASK_Z );
|
&fulldecl,
|
||||||
ti += tgsi_build_full_declaration(
|
&tokens[ti],
|
||||||
&fulldecl,
|
header,
|
||||||
&tokens[ti],
|
maxTokens - ti );
|
||||||
header,
|
break;
|
||||||
maxTokens - ti );
|
case TGSI_SEMANTIC_COLOR:
|
||||||
|
fulldecl = make_output_decl(i,
|
||||||
if( program->Base.OutputsWritten & (1 << FRAG_RESULT_COLR) ) {
|
TGSI_SEMANTIC_COLOR, 0,
|
||||||
fulldecl = make_output_decl(
|
TGSI_WRITEMASK_XYZW );
|
||||||
1,
|
ti += tgsi_build_full_declaration(
|
||||||
TGSI_SEMANTIC_COLOR, 0,
|
&fulldecl,
|
||||||
TGSI_WRITEMASK_XYZW );
|
&tokens[ti],
|
||||||
ti += tgsi_build_full_declaration(
|
header,
|
||||||
&fulldecl,
|
maxTokens - ti );
|
||||||
&tokens[ti],
|
break;
|
||||||
header,
|
default:
|
||||||
maxTokens - ti );
|
abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -15,7 +15,10 @@ tgsi_mesa_compile_fp_program(
|
|||||||
const ubyte inputSemanticName[],
|
const ubyte inputSemanticName[],
|
||||||
const ubyte inputSemanticIndex[],
|
const ubyte inputSemanticIndex[],
|
||||||
const GLuint interpMode[],
|
const GLuint interpMode[],
|
||||||
|
GLuint numOutputs,
|
||||||
const GLuint outputMapping[],
|
const GLuint outputMapping[],
|
||||||
|
const ubyte outputSemanticName[],
|
||||||
|
const ubyte outputSemanticIndex[],
|
||||||
struct tgsi_token *tokens,
|
struct tgsi_token *tokens,
|
||||||
GLuint maxTokens );
|
GLuint maxTokens );
|
||||||
|
|
||||||
|
@@ -394,7 +394,10 @@ st_translate_fragment_program(struct st_context *st,
|
|||||||
fs.input_semantic_index,
|
fs.input_semantic_index,
|
||||||
interpMode,
|
interpMode,
|
||||||
/* outputs */
|
/* outputs */
|
||||||
|
fs.num_outputs,
|
||||||
outputMapping,
|
outputMapping,
|
||||||
|
fs.output_semantic_name,
|
||||||
|
fs.output_semantic_index,
|
||||||
/* tokenized result */
|
/* tokenized result */
|
||||||
tokensOut, maxTokens);
|
tokensOut, maxTokens);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user