diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/prog_optimize.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_optimize.c b/src/mesa/shader/prog_optimize.c index 5aff16be46d..b4658cb37f9 100644 --- a/src/mesa/shader/prog_optimize.c +++ b/src/mesa/shader/prog_optimize.c @@ -73,6 +73,12 @@ remove_instructions(struct gl_program *prog, const GLboolean *removeFlags) } } } + /* Finish removing if the first instruction was to be removed. */ + if (removeCount > 0) { + GLint removeStart = removeEnd - removeCount + 1; + _mesa_delete_instructions(prog, removeStart, removeCount); + removeStart = removeCount = 0; /* reset removal info */ + } return totalRemoved; } |