struct brw_instruction *uncompacted);
static inline int
-next_offset(void *store, int offset)
+next_offset(const struct brw_context *brw, void *store, int offset)
{
struct brw_instruction *insn =
(struct brw_instruction *)((char *)store + offset);
break;
}
- offset = next_offset(store, offset);
+ offset = next_offset(brw, store, offset);
}
/* p->nr_insn is counting the number of uncompacted instructions still, so
while (start_offset + old_ip[offset / 8] * 8 != annotation[i].offset) {
assert(start_offset + old_ip[offset / 8] * 8 <
annotation[i].offset);
- offset = next_offset(store, offset);
+ offset = next_offset(brw, store, offset);
}
annotation[i].offset = start_offset + offset;
- offset = next_offset(store, offset);
+ offset = next_offset(brw, store, offset);
}
annotation[num_annotations].offset = p->next_insn_offset;
{
int offset;
void *store = p->store;
+ const struct brw_context *brw = p->brw;
- for (offset = next_offset(store, start_offset); offset < p->next_insn_offset;
- offset = next_offset(store, offset)) {
+ for (offset = next_offset(brw, store, start_offset);
+ offset < p->next_insn_offset;
+ offset = next_offset(brw, store, offset)) {
struct brw_instruction *insn = store + offset;
switch (insn->header.opcode) {
/* Always start after the instruction (such as a WHILE) we're trying to fix
* up.
*/
- for (offset = next_offset(store, start_offset); offset < p->next_insn_offset;
- offset = next_offset(store, offset)) {
+ for (offset = next_offset(brw, store, start_offset);
+ offset < p->next_insn_offset;
+ offset = next_offset(brw, store, offset)) {
struct brw_instruction *insn = store + offset;
if (insn->header.opcode == BRW_OPCODE_WHILE) {
return;
for (offset = 0; offset < p->next_insn_offset;
- offset = next_offset(store, offset)) {
+ offset = next_offset(brw, store, offset)) {
struct brw_instruction *insn = store + offset;
if (insn->header.cmpt_control) {