diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 60f73e2c82c..7b367ec036c 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1846,6 +1846,11 @@ vec4_visitor::run(gl_clip_plane *clip_planes) opt_set_dependency_control(); + if (c->last_scratch > 0) { + prog_data->base.total_scratch = + brw_get_scratch_size(c->last_scratch * REG_SIZE); + } + /* If any state parameters were appended, then ParameterValues could have * been realloced, in which case the driver uniform storage set up by * _mesa_associate_uniform_storage() would point to freed memory. Make @@ -1943,8 +1948,6 @@ brw_vs_emit(struct brw_context *brw, } g.generate_code(v.cfg, 8); assembly = g.get_assembly(final_assembly_size); - - c->base.last_scratch = v.last_scratch; } if (!assembly) { |