diff options
Diffstat (limited to 'src/intel/tools/gen_context.h')
-rw-r--r-- | src/intel/tools/gen_context.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/tools/gen_context.h b/src/intel/tools/gen_context.h index 3f488c07c9a..e7b75806e4e 100644 --- a/src/intel/tools/gen_context.h +++ b/src/intel/tools/gen_context.h @@ -97,6 +97,14 @@ * Valid */ +#define MI_LOAD_REGISTER_IMM_vals(data, flags, ...) do { \ + uint32_t __regs[] = { __VA_ARGS__ }; \ + assert((ARRAY_SIZE(__regs) % 2) == 0); \ + *(data)++ = MI_LOAD_REGISTER_IMM_n(ARRAY_SIZE(__regs) / 2) | (flags); \ + for (unsigned __e = 0; __e < ARRAY_SIZE(__regs); __e++) \ + *(data)++ = __regs[__e]; \ + } while (0) + #define RENDER_CONTEXT_DESCRIPTOR ((uint64_t)1 << 62 | RENDER_CONTEXT_ADDR | CONTEXT_FLAGS) #define BLITTER_CONTEXT_DESCRIPTOR ((uint64_t)2 << 62 | BLITTER_CONTEXT_ADDR | CONTEXT_FLAGS) #define VIDEO_CONTEXT_DESCRIPTOR ((uint64_t)3 << 62 | VIDEO_CONTEXT_ADDR | CONTEXT_FLAGS) |