mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
r600: handle state emit better
- move shader-related state with the rest of the shader setup/emit - start to track dirty state better
This commit is contained in:
parent
562ca49611
commit
d07bf2b35c
3 changed files with 16 additions and 8 deletions
|
|
@ -457,6 +457,9 @@ void r600InitCmdBuf(context_t *r600) /* from rcommonInitCmdBuf */
|
|||
GLuint size;
|
||||
rmesa->hw.max_state_size = 4000; /* rough estimate */
|
||||
|
||||
rmesa->hw.all_dirty = GL_TRUE;
|
||||
rmesa->hw.is_dirty = GL_TRUE;
|
||||
|
||||
/* Initialize command buffer */
|
||||
size = 256 * driQueryOptioni(&rmesa->optionCache,
|
||||
"command_buffer_size");
|
||||
|
|
|
|||
|
|
@ -139,6 +139,13 @@ static GLboolean r700SetupShaders(GLcontext * ctx)
|
|||
|
||||
r600UpdateTextureState(ctx);
|
||||
|
||||
r700SendFSState(context); // FIXME just a place holder for now
|
||||
r700SendPSState(context);
|
||||
r700SendVSState(context);
|
||||
|
||||
r700SendTextureState(context);
|
||||
r700SetupStreams(ctx);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -274,18 +281,16 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim
|
|||
void r700EmitState(GLcontext * ctx)
|
||||
{
|
||||
context_t *context = R700_CONTEXT(ctx);
|
||||
radeonContextPtr radeon = &context->radeon;
|
||||
|
||||
if (radeon->cmdbuf.cs->cdw && !radeon->hw.is_dirty && !radeon->hw.all_dirty)
|
||||
return;
|
||||
|
||||
rcommonEnsureCmdBufSpace(&context->radeon,
|
||||
context->radeon.hw.max_state_size, __FUNCTION__);
|
||||
|
||||
r700Start3D(context);
|
||||
r700SendSQConfig(context);
|
||||
r700SendFSState(context); // FIXME just a place holder for now
|
||||
r700SendPSState(context);
|
||||
r700SendVSState(context);
|
||||
|
||||
r700SendTextureState(context);
|
||||
r700SetupStreams(ctx);
|
||||
|
||||
r700SendUCPState(context);
|
||||
r700SendContextStates(context);
|
||||
|
|
@ -325,8 +330,6 @@ static GLboolean r700RunRender(GLcontext * ctx,
|
|||
|
||||
radeonReleaseArrays(ctx, ~0);
|
||||
|
||||
rcommonFlushCmdBuf( &context->radeon, __FUNCTION__ );
|
||||
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1854,6 +1854,8 @@ void r700InitState(GLcontext * ctx) //-------------------
|
|||
/* Set up color compare mask */
|
||||
r700->CB_CLRCMP_MSK.u32All = 0xFFFFFFFF;
|
||||
|
||||
context->radeon.hw.all_dirty = GL_TRUE;
|
||||
|
||||
}
|
||||
|
||||
void r700InitStateFuncs(struct dd_function_table *functions) //-----------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue