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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user