}
/* Scratch space is used for register spilling */
- if (c.base.last_scratch) {
- c.prog_data.base.base.total_scratch
- = brw_get_scratch_size(c.base.last_scratch*REG_SIZE);
-
+ if (c.prog_data.base.base.total_scratch) {
brw_get_scratch_bo(brw, &stage_state->scratch_bo,
c.prog_data.base.base.total_scratch *
brw->max_gs_threads);
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
}
g.generate_code(v.cfg, 8);
assembly = g.get_assembly(final_assembly_size);
-
- c->base.last_scratch = v.last_scratch;
}
if (!assembly) {
}
/* Scratch space is used for register spilling */
- if (c.base.last_scratch) {
- prog_data.base.base.total_scratch
- = brw_get_scratch_size(c.base.last_scratch*REG_SIZE);
-
+ if (prog_data.base.base.total_scratch) {
brw_get_scratch_bo(brw, &brw->vs.base.scratch_bo,
prog_data.base.base.total_scratch *
brw->max_vs_threads);