diff options
author | Dave Airlie <[email protected]> | 2017-06-01 05:12:19 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-06-02 12:48:20 +1000 |
commit | 7205431e731107d6b71f15cb431dd459babdf8ed (patch) | |
tree | 7505d0edc517a9766ceea10e8acff450519b3e23 /src/amd/vulkan/si_cmd_buffer.c | |
parent | 1a22c4c960b80f7f7d075b362cf78544e235a861 (diff) |
radv: factor out si_emit_wait_fence code.
This code was in a few places, consolidate into one.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/si_cmd_buffer.c')
-rw-r--r-- | src/amd/vulkan/si_cmd_buffer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index d94e23b975f..3bf1d391cf3 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -762,6 +762,20 @@ si_get_ia_multi_vgt_param(struct radv_cmd_buffer *cmd_buffer, } +void +si_emit_wait_fence(struct radeon_winsys_cs *cs, + uint64_t va, uint32_t ref, + uint32_t mask) +{ + radeon_emit(cs, PKT3(PKT3_WAIT_REG_MEM, 5, 0)); + radeon_emit(cs, WAIT_REG_MEM_EQUAL | WAIT_REG_MEM_MEM_SPACE(1)); + radeon_emit(cs, va); + radeon_emit(cs, va >> 32); + radeon_emit(cs, ref); /* reference value */ + radeon_emit(cs, mask); /* mask */ + radeon_emit(cs, 4); /* poll interval */ +} + static void si_emit_acquire_mem(struct radeon_winsys_cs *cs, bool is_mec, |