aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index 217a26455..baa317204 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -2157,8 +2157,6 @@ ir_to_mesa_visitor::visit(ir_return *ir)
void
ir_to_mesa_visitor::visit(ir_discard *ir)
{
- struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog;
-
if (ir->condition) {
ir->condition->accept(this);
this->result.negate = ~this->result.negate;
@@ -2166,8 +2164,6 @@ ir_to_mesa_visitor::visit(ir_discard *ir)
} else {
emit(ir, OPCODE_KIL_NV);
}
-
- fp->UsesKill = GL_TRUE;
}
void
@@ -3119,6 +3115,12 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
}
}
+ if (shader->UniformBlocks)
+ ralloc_free(shader->UniformBlocks);
+ shader->NumUniformBlocks = state->num_uniform_blocks;
+ shader->UniformBlocks = state->uniform_blocks;
+ ralloc_steal(shader, shader->UniformBlocks);
+
/* Retain any live IR, but trash the rest. */
reparent_ir(shader->ir, shader->ir);