if (!allocated_without_spills)
schedule_instructions(SCHEDULE_POST);
- if (c->last_scratch > 0) {
- c->prog_data.total_scratch = brw_get_scratch_size(c->last_scratch);
+ if (last_scratch > 0) {
+ c->prog_data.total_scratch = brw_get_scratch_size(last_scratch);
}
if (dispatch_width == 8)
/** Number of uniform variable components visited. */
unsigned uniforms;
+ /** Byte-offset for the next available spot in the scratch space buffer. */
+ unsigned last_scratch;
+
/**
* Array mapping UNIFORM register numbers to the pull parameter index,
* or -1 if this uniform register isn't being uploaded as a pull constant.
{
int reg_size = dispatch_width * sizeof(float);
int size = virtual_grf_sizes[spill_reg];
- unsigned int spill_offset = c->last_scratch;
+ unsigned int spill_offset = last_scratch;
assert(ALIGN(spill_offset, 16) == spill_offset); /* oword read/write req. */
int spill_base_mrf = dispatch_width > 8 ? 13 : 14;
spilled_any_registers = true;
}
- c->last_scratch += size * reg_size;
+ last_scratch += size * reg_size;
/* Generate spill/unspill instructions for the objects being
* spilled. Right now, we spill or unspill the whole thing to a
this->regs_live_at_ip = NULL;
this->uniforms = 0;
+ this->last_scratch = 0;
this->pull_constant_loc = NULL;
this->push_constant_loc = NULL;
uint8_t nr_payload_regs;
GLuint source_depth_to_render_target:1;
GLuint runtime_check_aads_emit:1;
-
- GLuint last_scratch;
};
/**