diff options
author | Kenneth Graunke <[email protected]> | 2018-01-08 14:44:22 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:04 -0800 |
commit | a13d417ac145cf4c3517e62093bccc5c4f7faaf3 (patch) | |
tree | 57847f7fef3f8747de57e812a60a037e7e1c6a6c /src/gallium | |
parent | aee39df710d2742c15d46f1da65529f8d83cb713 (diff) |
iris: merge pack
this lets us merge dynamic and pre-baked state, also like anv
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 7da0e8956dd..83f8125d9bf 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -76,6 +76,17 @@ __gen_combine_address(void *user_data, void *location, iris_require_command_space(batch, 4 * __genxml_cmd_length(cmd)); \ iris_pack_command(cmd, batch->cmdbuf.map_next, name) +#define iris_emit_merge(batch, dwords0, dwords1) \ + do { \ + STATIC_ASSERT(ARRAY_SIZE(dwords0) == ARRAY_SIZE(dwords1)); \ + \ + iris_require_command_space(batch, ARRAY_SIZE(dwords0)); \ + uint32_t *dw = batch->cmdbuf.map_next; \ + for (uint32_t i = 0; i < ARRAY_SIZE(dwords0); i++) \ + dw[i] = (dwords0)[i] | (dwords1)[i]; \ + VG(VALGRIND_CHECK_MEM_IS_DEFINED(dw, ARRAY_SIZE(dwords0) * 4)); \ + } while (0) + #include "genxml/genX_pack.h" #include "genxml/gen_macros.h" |