diff options
author | Cooper Yuan <[email protected]> | 2009-07-29 15:23:56 +0800 |
---|---|---|
committer | Cooper Yuan <[email protected]> | 2009-07-29 15:23:56 +0800 |
commit | 0f6d3aece7b193dcacbd94f87ac734ee3a44b366 (patch) | |
tree | 9d9e36a82b38433bf4a2914aa87284bb27d8a6f3 | |
parent | 693f900b163f89952ed9b4c30d093f8ead461657 (diff) |
R6xx/r7xx: VS export fog color as parameter
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_assembler.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_fragprog.c | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index 1d41c5cf785..ebd5ff106be 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -4014,6 +4014,22 @@ GLboolean Process_Vertex_Exports(r700_AssemblerBase *pR700AsmCode, export_starting_index++; } + unBit = 1 << VERT_RESULT_FOGC; + if(OutputsWritten & unBit) + { + if( GL_FALSE == Process_Export(pR700AsmCode, + SQ_EXPORT_PARAM, + export_starting_index, + 1, + pR700AsmCode->ucVP_OutputMap[VERT_RESULT_FOGC], + GL_FALSE) ) + { + return GL_FALSE; + } + + export_starting_index++; + } + for(i=0; i<8; i++) { unBit = 1 << (VERT_RESULT_TEX0 + i); diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c index 88e66491ba8..a473dfe8889 100644 --- a/src/mesa/drivers/dri/r600/r700_fragprog.c +++ b/src/mesa/drivers/dri/r600/r700_fragprog.c @@ -67,6 +67,12 @@ void Map_Fragment_Program(r700_AssemblerBase *pAsm, pAsm->uiFP_AttributeMap[FRAG_ATTRIB_COL1] = pAsm->number_used_registers++; } + unBit = 1 << FRAG_ATTRIB_FOGC; + if(mesa_fp->Base.InputsRead & unBit) + { + pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FOGC] = pAsm->number_used_registers++; + } + for(i=0; i<8; i++) { unBit = 1 << (FRAG_ATTRIB_TEX0 + i); |