summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2017-06-10 15:41:22 +0200
committerAndres Gomez <agomez@igalia.com>2017-06-28 20:15:04 +0300
commitf174362ce7a8ad20086352669e7a2ba63ea74f6a (patch)
treec4fadcb646e032622a63ad1572000de4bd3df6ca
parent365c326861f40689a745a51af54dda4cad4b5b94 (diff)
mesa: flush vertices before updating ctx->_Shader
Cc: 17.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit 0b70d6ec568a2c5d7b2ff814e6e26b6d1379c829)
-rw-r--r--src/mesa/main/pipelineobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index c1dd8d75c76..721a15e638d 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -469,6 +469,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
@@ -480,8 +482,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) {