Commit 0b70d6ec authored by Marek Olšák's avatar Marek Olšák

mesa: flush vertices before updating ctx->_Shader

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
Reviewed-by: Timothy Arceri's avatarTimothy Arceri <tarceri@itsqueeze.com>
parent 0160a59f
......@@ -525,6 +525,8 @@ _mesa_bind_pipeline(struct gl_context *ctx,
* considered current."
*/
if (&ctx->Shader != ctx->_Shader) {
FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
if (pipe != NULL) {
/* Bound the pipeline to the current program and
* restore the pipeline state
......@@ -536,8 +538,6 @@ _mesa_bind_pipeline(struct gl_context *ctx,
ctx->Pipeline.Default);
}
FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
for (i = 0; i < MESA_SHADER_STAGES; i++) {
struct gl_program *prog = ctx->_Shader->CurrentProgram[i];
if (prog) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment