diff options
author | Alex Deucher <[email protected]> | 2009-07-28 15:53:45 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-07-28 15:53:45 -0400 |
commit | b1f7c844a38418cbf3fbcef6c2fb0606a1dd6b7e (patch) | |
tree | 81ac2cf7f1369f180bc16fffdad8b68ca9c1268f /src/mesa | |
parent | 4d648523aa01af3c9111f5d6394866396ebfb7a2 (diff) |
r600: move r700TranslateFragmentShader into r700UpdateShaders
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_render.c | 17 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_state.c | 22 |
2 files changed, 19 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 5a2bf84b59e..ea8419d3d2d 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -276,20 +276,12 @@ static GLboolean r700RunRender(GLcontext * ctx, context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); int lastIndex = 0; -#if 1 BATCH_LOCALS(&context->radeon); unsigned int i, j; TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *vb = &tnl->vb; - struct r700_fragment_program *fp = (struct r700_fragment_program *) - (ctx->FragmentProgram._Current); - if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) - { - fp->r700AsmCode.bR6xx = 1; - } - r700Start3D(context); /* TODO : this is too much. */ r700SendSQConfig(context); @@ -308,14 +300,6 @@ static GLboolean r700RunRender(GLcontext * ctx, r600UpdateTextureState(ctx); r700SendTextureState(context); - if(GL_FALSE == fp->translated) - { - if( GL_FALSE == r700TranslateFragmentShader(fp, &(fp->mesa_program)) ) - { - return GL_TRUE; - } - } - r700SetupShaders(ctx); r700SendFSState(context); // FIXME just a place holder for now @@ -391,7 +375,6 @@ static GLboolean r700RunRender(GLcontext * ctx, radeonReleaseArrays(ctx, 0); -#endif //0 rcommonFlushCmdBuf( &context->radeon, __FUNCTION__ ); return GL_FALSE; diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 5563a63156c..c24c859ef58 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -72,12 +72,28 @@ void r700UpdateShaders (GLcontext * ctx) //---------------------------------- GLvector4f dummy_attrib[_TNL_ATTRIB_MAX]; GLvector4f *temp_attrib[_TNL_ATTRIB_MAX]; - - struct r700_vertex_program *vp; - int i; + int i; + + if (ctx->FragmentProgram._Current) { + struct r700_fragment_program *fp = (struct r700_fragment_program *) + (ctx->FragmentProgram._Current); + if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) + { + fp->r700AsmCode.bR6xx = 1; + } + + if(GL_FALSE == fp->translated) + { + if( GL_FALSE == r700TranslateFragmentShader(fp, &(fp->mesa_program)) ) + { + //return GL_TRUE; + } + } + } if (context->radeon.NewGLState) { + struct r700_vertex_program *vp; context->radeon.NewGLState = 0; for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) |