i965: Move next_offset() to brw_eu.h for use elsewhere.

Also perform arithmetic on char* rather than void* since the latter is a
GNU C extension not available in C++.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner
2014-05-17 13:00:12 -07:00
parent e32e69cc27
commit 392cbc2f93
2 changed files with 12 additions and 11 deletions
+12
View File
@@ -424,6 +424,18 @@ void brw_debug_compact_uncompact(struct brw_context *brw,
struct brw_instruction *orig,
struct brw_instruction *uncompacted);
static inline int
next_offset(void *store, int offset)
{
struct brw_instruction *insn =
(struct brw_instruction *)((char *)store + offset);
if (insn->header.cmpt_control)
return offset + 8;
else
return offset + 16;
}
#ifdef __cplusplus
}
#endif
-11
View File
@@ -2382,17 +2382,6 @@ void brw_urb_WRITE(struct brw_compile *p,
swizzle);
}
static int
next_offset(void *store, int offset)
{
struct brw_instruction *insn = (void *)store + offset;
if (insn->header.cmpt_control)
return offset + 8;
else
return offset + 16;
}
static int
brw_find_next_block_end(struct brw_compile *p, int start_offset)
{