Mesa (master): r600: fix typos for vert-tex

Andre Maasikas andrem at kemper.freedesktop.org
Tue Dec 15 00:27:53 PST 2009


Module: Mesa
Branch: master
Commit: dbc374cd3030d5db2c8f5d9b9405976d7efa458d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbc374cd3030d5db2c8f5d9b9405976d7efa458d

Author: Andre Maasikas <amaasikas at gmail.com>
Date:   Tue Dec 15 10:22:34 2009 +0200

r600: fix typos for vert-tex

at least i think this is how it was meant to work

---

 src/mesa/drivers/dri/r600/r700_assembler.c |    2 +-
 src/mesa/drivers/dri/r600/r700_chip.c      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 43dafd5..e10b23b 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -1523,7 +1523,7 @@ GLboolean assemble_tex_instruction(r700_AssemblerBase *pAsm, GLboolean normalize
     if(SPT_VP == pAsm->currentShaderType)
     {
         tex_instruction_ptr->m_Word0.f.resource_id      = texture_unit_source->reg + VERT_ATTRIB_MAX;
-        pAsm->unVetTexBits |= 1 < texture_unit_source->reg;
+        pAsm->unVetTexBits |= 1 << texture_unit_source->reg;
     }
     else
     {
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 0b90079..c124e02 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -75,7 +75,7 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
 					BEGIN_BATCH_NO_AUTOSTATE(9 + 4);
 					R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7));
 
-                    if( (1<i) & vp->r700AsmCode.unVetTexBits )                    
+                    if( (1<<i) & vp->r700AsmCode.unVetTexBits )                    
                     {   /* vs texture */                                     
                         R600_OUT_BATCH((i + VERT_ATTRIB_MAX + SQ_FETCH_RESOURCE_VS_OFFSET) * FETCH_RESOURCE_STRIDE);
                     }
@@ -127,7 +127,7 @@ static void r700SendTexSamplerState(GLcontext *ctx, struct radeon_state_atom *at
 				BEGIN_BATCH_NO_AUTOSTATE(5);
 				R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_SAMPLER, 3));
 
-                if( (1<i) & vp->r700AsmCode.unVetTexBits )                    
+                if( (1<<i) & vp->r700AsmCode.unVetTexBits )                    
                 {   /* vs texture */
                     R600_OUT_BATCH((i+SQ_TEX_SAMPLER_VS_OFFSET) * SAMPLER_STRIDE); //work 1
                 }



More information about the mesa-commit mailing list