diff options
author | Alex Deucher <[email protected]> | 2009-07-31 11:33:16 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-07-31 14:52:56 -0400 |
commit | 19ce428c8a08565b06795f4b8020dc6399694789 (patch) | |
tree | 6e381071d6889ed7a57eb386037cfb09c7b3fbfe /src/mesa/drivers | |
parent | 54a16419235d298e4b7c1761d6abe8066e6cf393 (diff) |
r600: ensure we have enough room for full state emit
full state is roughly 4000 dwords, but will vary depending
on the rendering.
Also fix some warnings.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_cmdbuf.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_fragprog.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_render.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_vertprog.c | 7 |
4 files changed, 5 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_cmdbuf.c b/src/mesa/drivers/dri/r600/r600_cmdbuf.c index e9ad9ba64c6..15b99926d22 100644 --- a/src/mesa/drivers/dri/r600/r600_cmdbuf.c +++ b/src/mesa/drivers/dri/r600/r600_cmdbuf.c @@ -483,8 +483,9 @@ struct radeon_cs_manager * r600_radeon_cs_manager_legacy_ctor(struct radeon_cont void r600InitCmdBuf(context_t *r600) /* from rcommonInitCmdBuf */ { radeonContextPtr rmesa = &r600->radeon; - GLuint size; + rmesa->hw.max_state_size = 4000; /* rough estimate */ + /* Initialize command buffer */ size = 256 * driQueryOptioni(&rmesa->optionCache, "command_buffer_size"); diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c index 587134676bc..4ac37f1dfe8 100644 --- a/src/mesa/drivers/dri/r600/r700_fragprog.c +++ b/src/mesa/drivers/dri/r600/r700_fragprog.c @@ -262,15 +262,12 @@ void * r700GetActiveFpShaderBo(GLcontext * ctx) GLboolean r700SetupFragmentProgram(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); - BATCH_LOCALS(&context->radeon); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); struct r700_fragment_program *fp = (struct r700_fragment_program *) (ctx->FragmentProgram._Current); r700_AssemblerBase *pAsm = &(fp->r700AsmCode); struct gl_fragment_program *mesa_fp = &(fp->mesa_program); - struct gl_program_parameter_list *paramList; - unsigned int unNumParamData; unsigned int ui, i; unsigned int unNumOfReg; unsigned int unBit; @@ -398,7 +395,6 @@ GLboolean r700SendPSConstants(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); BATCH_LOCALS(&context->radeon); - R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); struct r700_fragment_program *fp = (struct r700_fragment_program *) (ctx->FragmentProgram._Current); struct gl_program_parameter_list *paramList; diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index c26c20e6ee5..bd4e0bfff42 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -277,6 +277,9 @@ void r700EmitState(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); + rcommonEnsureCmdBufSpace(&context->radeon, + context->radeon.hw.max_state_size, __FUNCTION__); + r700Start3D(context); r700SendSQConfig(context); r700SendFSState(context); // FIXME just a place holder for now diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index fda6f756872..8652f1d472d 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -335,18 +335,12 @@ void * r700GetActiveVpShaderBo(GLcontext * ctx) GLboolean r700SetupVertexProgram(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); - - BATCH_LOCALS(&context->radeon); - R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); struct r700_vertex_program *vp = (struct r700_vertex_program *)ctx->VertexProgram._Current; struct gl_program_parameter_list *paramList; - unsigned int unNumParamData; - - unsigned int ui; if(GL_FALSE == vp->loaded) { @@ -400,7 +394,6 @@ GLboolean r700SendVSConstants(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); BATCH_LOCALS(&context->radeon); - R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); struct r700_vertex_program *vp = (struct r700_vertex_program *)ctx->VertexProgram._Current; struct gl_program_parameter_list *paramList; |