diff options
author | Jason Ekstrand <[email protected]> | 2016-04-18 15:32:29 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-20 14:54:09 -0700 |
commit | cae2f14947be97a5b99848da03af5a3a4acfa8fa (patch) | |
tree | 6b9fb0e357d9763a2a1c323c4bc06a344296271d | |
parent | 932c3535920359830e9665e879095d36416668f9 (diff) |
anv/device: Use the new emit macro
Acked-by: Kristian Høgsberg <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_batch_chain.c | 17 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 8 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 034f3fda24a..3bf0cd0709c 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -455,12 +455,13 @@ emit_batch_buffer_start(struct anv_cmd_buffer *cmd_buffer, const uint32_t gen8_length = GEN8_MI_BATCH_BUFFER_START_length - GEN8_MI_BATCH_BUFFER_START_length_bias; - anv_batch_emit(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_START, - .DWordLength = cmd_buffer->device->info.gen < 8 ? - gen7_length : gen8_length, - ._2ndLevelBatchBuffer = _1stlevelbatch, - .AddressSpaceIndicator = ASI_PPGTT, - .BatchBufferStartAddress = { bo, offset }); + anv_batch_emit_blk(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_START, bbs) { + bbs.DWordLength = cmd_buffer->device->info.gen < 8 ? + gen7_length : gen8_length; + bbs._2ndLevelBatchBuffer = _1stlevelbatch; + bbs.AddressSpaceIndicator = ASI_PPGTT; + bbs.BatchBufferStartAddress = (struct anv_address) { bo, offset }; + } } static void @@ -711,11 +712,11 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer) cmd_buffer->batch.end += GEN8_MI_BATCH_BUFFER_START_length * 4; assert(cmd_buffer->batch.end == batch_bo->bo.map + batch_bo->bo.size); - anv_batch_emit(&cmd_buffer->batch, GEN7_MI_BATCH_BUFFER_END); + anv_batch_emit_blk(&cmd_buffer->batch, GEN7_MI_BATCH_BUFFER_END, bbe); /* Round batch up to an even number of dwords. */ if ((cmd_buffer->batch.next - cmd_buffer->batch.start) & 4) - anv_batch_emit(&cmd_buffer->batch, GEN7_MI_NOOP); + anv_batch_emit_blk(&cmd_buffer->batch, GEN7_MI_NOOP, noop); cmd_buffer->exec_mode = ANV_CMD_BUFFER_EXEC_MODE_PRIMARY; } diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index e477fe195ea..c2c2db8ebf9 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1081,8 +1081,8 @@ VkResult anv_DeviceWaitIdle( batch.start = batch.next = cmds; batch.end = (void *) cmds + sizeof(cmds); - anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END); - anv_batch_emit(&batch, GEN7_MI_NOOP); + anv_batch_emit_blk(&batch, GEN7_MI_BATCH_BUFFER_END, bbe); + anv_batch_emit_blk(&batch, GEN7_MI_NOOP, noop); return anv_device_submit_simple_batch(device, &batch); } @@ -1423,8 +1423,8 @@ VkResult anv_CreateFence( const uint32_t batch_offset = align_u32(sizeof(*fence), CACHELINE_SIZE); batch.next = batch.start = fence->bo.map + batch_offset; batch.end = fence->bo.map + fence->bo.size; - anv_batch_emit(&batch, GEN7_MI_BATCH_BUFFER_END); - anv_batch_emit(&batch, GEN7_MI_NOOP); + anv_batch_emit_blk(&batch, GEN7_MI_BATCH_BUFFER_END, bbe); + anv_batch_emit_blk(&batch, GEN7_MI_NOOP, noop); if (!device->info.has_llc) { assert(((uintptr_t) batch.start & CACHELINE_MASK) == 0); |