diff options
author | Richard Li <richardradeon@gmail.com> | 2009-09-22 16:39:11 -0400 |
---|---|---|
committer | Richard Li <richardradeon@gmail.com> | 2009-09-22 17:04:49 -0400 |
commit | 81283b0bf0a8f7b31517adc224c20531e27fab42 (patch) | |
tree | 7f1874a26f164f17fad1c44a0052ff44dcc1c1b6 /src/mesa/drivers/dri/r600/r700_state.c | |
parent | da0e4e557b85761e3eb03f9cbce2c3ef140fd5ef (diff) |
r600 : add draw_prim support.
Diffstat (limited to 'src/mesa/drivers/dri/r600/r700_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_state.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index fc0b511684..1043eabb14 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -92,7 +92,25 @@ void r700UpdateShaders (GLcontext * ctx) //---------------------------------- } } - r700SelectVertexShader(ctx); + r700SelectVertexShader(ctx, 1); + r700UpdateStateParameters(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); + context->radeon.NewGLState = 0; +} + +void r700UpdateShaders2(GLcontext * ctx) +{ + context_t *context = R700_CONTEXT(ctx); + + /* should only happenen once, just after context is created */ + /* TODO: shouldn't we fallback to sw here? */ + if (!ctx->FragmentProgram._Current) { + _mesa_fprintf(stderr, "No ctx->FragmentProgram._Current!!\n"); + return; + } + + r700SelectFragmentShader(ctx); + + r700SelectVertexShader(ctx, 2); r700UpdateStateParameters(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); context->radeon.NewGLState = 0; } |