diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-05-29 14:45:07 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-05-29 14:45:07 -0400 |
commit | e6eb0ce6ef61e16c5d986b370a13c7b62364ad4e (patch) | |
tree | 73ec27eed3ad89b83501cc7827b491e4b5c7d069 /src | |
parent | 949c489f592d5227843a06a5ae3851102cd46333 (diff) |
more cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_chip.c | 73 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_chip.h | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_ioctl.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_render.c | 2 |
4 files changed, 21 insertions, 62 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 5cd0d72d6e..3db03578ed 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -53,16 +53,6 @@ static GLboolean r700DestroyChipObj(GLcontext * ctx) r700 = (R700_CHIP_CONTEXT *)(context->chipobj.pvChipObj); - if(0 != r700->pbo_vs_clear) - { - r600DeleteShader(context, r700->pbo_vs_clear); - } - - if(0 != r700->pbo_fs_clear) - { - r600DeleteShader(context, r700->pbo_fs_clear); - } - FREE(r700->pStateList); FREE(r700); @@ -512,8 +502,7 @@ inline GLboolean needRelocReg(context_t *context, unsigned int reg) return GL_FALSE; } -inline GLboolean setRelocReg(context_t *context, unsigned int reg, - GLboolean bUseStockShader) +inline GLboolean setRelocReg(context_t *context, unsigned int reg) { BATCH_LOCALS(&context->radeon); R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context); @@ -573,63 +562,35 @@ inline GLboolean setRelocReg(context_t *context, unsigned int reg, return GL_TRUE; } break; - case mmSQ_PGM_START_VS: - { - if(GL_TRUE == bUseStockShader) - { - if(NULL != r700->pbo_vs_clear) - { - pbo = (struct radeon_bo *)(r700->pbo_vs_clear); - } - else - { - return GL_FALSE; - } - } - else - { - pbo = (struct radeon_bo *)r700GetActiveVpShaderBo(GL_CONTEXT(context)); - } + case mmSQ_PGM_START_VS: + { + pbo = (struct radeon_bo *)r700GetActiveVpShaderBo(GL_CONTEXT(context)); offset_mod.shift = NO_SHIFT; offset_mod.shiftbits = 0; - offset_mod.mask = 0xFFFFFFFF; + offset_mod.mask = 0xFFFFFFFF; - R600_OUT_BATCH_RELOC(r700->SQ_PGM_START_VS.u32All, - pbo, + R600_OUT_BATCH_RELOC(r700->SQ_PGM_START_VS.u32All, + pbo, r700->SQ_PGM_START_VS.u32All, RADEON_GEM_DOMAIN_GTT, 0, 0, &offset_mod); return GL_TRUE; } break; - case mmSQ_PGM_START_FS: - case mmSQ_PGM_START_ES: - case mmSQ_PGM_START_GS: - case mmSQ_PGM_START_PS: + case mmSQ_PGM_START_FS: + case mmSQ_PGM_START_ES: + case mmSQ_PGM_START_GS: + case mmSQ_PGM_START_PS: { - if(GL_TRUE == bUseStockShader) - { - if(NULL != r700->pbo_fs_clear) - { - pbo = (struct radeon_bo *)(r700->pbo_fs_clear); - } - else - { - return GL_FALSE; - } - } - else - { - pbo = (struct radeon_bo *)r700GetActiveFpShaderBo(GL_CONTEXT(context)); - } + pbo = (struct radeon_bo *)r700GetActiveFpShaderBo(GL_CONTEXT(context)); offset_mod.shift = NO_SHIFT; offset_mod.shiftbits = 0; offset_mod.mask = 0xFFFFFFFF; voffset = 0; - R600_OUT_BATCH_RELOC(r700->SQ_PGM_START_PS.u32All, - pbo, + R600_OUT_BATCH_RELOC(r700->SQ_PGM_START_PS.u32All, + pbo, r700->SQ_PGM_START_PS.u32All, RADEON_GEM_DOMAIN_GTT, 0, 0, &offset_mod); return GL_TRUE; @@ -640,7 +601,7 @@ inline GLboolean setRelocReg(context_t *context, unsigned int reg, return GL_FALSE; } -GLboolean r700SendContextStates(context_t *context, GLboolean bUseStockShader) +GLboolean r700SendContextStates(context_t *context) { BATCH_LOCALS(&context->radeon); @@ -676,11 +637,11 @@ GLboolean r700SendContextStates(context_t *context, GLboolean bUseStockShader) pState = pState->pNext; - BEGIN_BATCH_NO_AUTOSTATE(toSend + 2); + BEGIN_BATCH_NO_AUTOSTATE(toSend + 2); R600_OUT_BATCH_REGSEQ(((pInit->unOffset + ASIC_CONTEXT_BASE_INDEX)<<2), toSend); for(ui=0; ui<toSend; ui++) { - if( GL_FALSE == setRelocReg(context, pInit->unOffset, bUseStockShader) ) + if( GL_FALSE == setRelocReg(context, pInit->unOffset) ) { /* for not reloc reg. */ R600_OUT_BATCH(*(pInit->puiValue)); diff --git a/src/mesa/drivers/dri/r600/r700_chip.h b/src/mesa/drivers/dri/r600/r700_chip.h index c8d9cbfbda..88b5075479 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.h +++ b/src/mesa/drivers/dri/r600/r700_chip.h @@ -447,8 +447,6 @@ typedef struct _R700_CHIP_CONTEXT R700_TEXTURE_STATES texture_states; - void * pbo_vs_clear; - void * pbo_fs_clear; GLboolean bEnablePerspective; } R700_CHIP_CONTEXT; @@ -456,7 +454,7 @@ typedef struct _R700_CHIP_CONTEXT #define R700_CONTEXT_STATES(context) ((R700_CHIP_CONTEXT *)(context->chipobj.pvChipObj)) extern GLboolean r700InitChipObject(context_t *context); -extern GLboolean r700SendContextStates(context_t *context, GLboolean bUseStockShader); +extern GLboolean r700SendContextStates(context_t *context); extern int r700SetupStreams(GLcontext * ctx); extern void r700SetupVTXConstants(GLcontext * ctx, unsigned int nStreamID, diff --git a/src/mesa/drivers/dri/r600/r700_ioctl.c b/src/mesa/drivers/dri/r600/r700_ioctl.c index 1ab3ee7de5..f8c3359a47 100644 --- a/src/mesa/drivers/dri/r600/r700_ioctl.c +++ b/src/mesa/drivers/dri/r600/r700_ioctl.c @@ -60,8 +60,8 @@ static void r700Flush(GLcontext *ctx) if (radeon->dma.flush) radeon->dma.flush( ctx ); - r700SendContextStates(context, GL_FALSE); - + r700SendContextStates(context); + if (radeon->cmdbuf.cs->cdw) rcommonFlushCmdBuf(radeon, __FUNCTION__); } diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 78b92d695e..1f0604da5d 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -294,7 +294,7 @@ static GLboolean r700RunRender(GLcontext * ctx, /* flush vtx */ //r700SyncSurf(context); /* */ - r700SendContextStates(context, GL_FALSE); + r700SendContextStates(context); /* richard test code */ for (i = 0; i < vb->PrimitiveCount; i++) |