summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Maasikas <[email protected]>2010-09-02 11:37:23 +0300
committerAndre Maasikas <[email protected]>2010-09-09 11:08:11 +0300
commit1f12945d2fba751e09c2f2dd01899107590b30ec (patch)
tree1c3293d8b640ea31202843e4c1bb57fd32515314
parent7753416c5b6bdcc757983400c50c5cf878bc9caf (diff)
r600: remove depth exports move, just set to output x <- z in the export intruction
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c75
1 files changed, 5 insertions, 70 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 5d557f725ac..798d6a745da 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -7659,8 +7659,6 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
GLuint starting_register_number,
GLboolean is_depth_export)
{
- unsigned char ucWriteMask;
-
check_current_clause(pAsm, CF_EMPTY_CLAUSE);
check_current_clause(pAsm, CF_EXPORT_CLAUSE); //alloc the cf_current_export_clause_ptr
@@ -7740,43 +7738,21 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
{
assert(starting_register_number >= pAsm->starting_export_register_number);
- ucWriteMask = 0x0F;
/* exports Z as a float into Red channel */
if (GL_TRUE == is_depth_export)
- ucWriteMask = 0x1;
-
- if( (ucWriteMask & 0x1) != 0)
{
- pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_x = SQ_SEL_X;
+ pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_x = SQ_SEL_Z;
+ pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_y = SQ_SEL_MASK;
+ pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_z = SQ_SEL_MASK;
+ pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_w = SQ_SEL_MASK;
}
else
{
- pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_x = SQ_SEL_MASK;
- }
- if( ((ucWriteMask>>1) & 0x1) != 0)
- {
+ pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_x = SQ_SEL_X;
pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_y = SQ_SEL_Y;
- }
- else
- {
- pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_y = SQ_SEL_MASK;
- }
- if( ((ucWriteMask>>2) & 0x1) != 0)
- {
pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_z = SQ_SEL_Z;
- }
- else
- {
- pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_z = SQ_SEL_MASK;
- }
- if( ((ucWriteMask>>3) & 0x1) != 0)
- {
pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_w = SQ_SEL_W;
}
- else
- {
- pAsm->cf_current_export_clause_ptr->m_Word1_SWIZ.f.sel_w = SQ_SEL_MASK;
- }
}
else
{
@@ -7792,39 +7768,6 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
return GL_TRUE;
}
-GLboolean Move_Depth_Exports_To_Correct_Channels(r700_AssemblerBase *pAsm, BITS depth_channel_select)
-{
- gl_inst_opcode Opcode_save = pAsm->pILInst[pAsm->uiCurInst].Opcode; //Should be OPCODE_END
- pAsm->pILInst[pAsm->uiCurInst].Opcode = OPCODE_MOV;
-
- // MOV depth_export_register.hw_depth_channel, depth_export_register.depth_channel_select
-
- pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
-
- setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
- pAsm->D.dst.rtype = DST_REG_TEMPORARY;
- pAsm->D.dst.reg = pAsm->depth_export_register_number;
-
- pAsm->D.dst.writex = 1; // depth goes in R channel for HW
-
- setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
- pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
- pAsm->S[0].src.reg = pAsm->depth_export_register_number;
-
- setswizzle_PVSSRC(&(pAsm->S[0].src), depth_channel_select);
-
- noneg_PVSSRC(&(pAsm->S[0].src));
-
- if( GL_FALSE == next_ins(pAsm) )
- {
- return GL_FALSE;
- }
-
- pAsm->pILInst[pAsm->uiCurInst].Opcode = Opcode_save;
-
- return GL_TRUE;
-}
-
GLboolean Process_Fragment_Exports(r700_AssemblerBase *pR700AsmCode,
GLbitfield OutputsWritten)
{
@@ -7832,14 +7775,6 @@ GLboolean Process_Fragment_Exports(r700_AssemblerBase *pR700AsmCode,
GLuint export_count = 0;
unsigned int i;
- if(pR700AsmCode->depth_export_register_number >= 0)
- {
- if( GL_FALSE == Move_Depth_Exports_To_Correct_Channels(pR700AsmCode, SQ_SEL_Z) ) // depth
- {
- return GL_FALSE;
- }
- }
-
for (i = 0; i < FRAG_RESULT_MAX; ++i)
{
unBit = 1 << i;