summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-07-15 16:48:13 -0700
committerJason Ekstrand <[email protected]>2015-07-15 16:56:29 -0700
commit9c0db9d349dda6ec8788007eaa4545009adf3e26 (patch)
treeb4bf402d923d547b2edbb0463c25352f4c6def5a
parent6037b5d6100aeea9f0970fccd4ec38c3f60ffcc9 (diff)
vk/cmd_buffer: Rename bo_count to exec2_bo_count
-rw-r--r--src/vulkan/anv_cmd_buffer.c18
-rw-r--r--src/vulkan/aub.c8
-rw-r--r--src/vulkan/device.c2
-rw-r--r--src/vulkan/private.h2
4 files changed, 15 insertions, 15 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c
index e6e60e14189..8ccecd8f63b 100644
--- a/src/vulkan/anv_cmd_buffer.c
+++ b/src/vulkan/anv_cmd_buffer.c
@@ -510,11 +510,11 @@ anv_cmd_buffer_add_bo(struct anv_cmd_buffer *cmd_buffer,
{
struct drm_i915_gem_exec_object2 *obj;
- if (bo->index < cmd_buffer->bo_count &&
+ if (bo->index < cmd_buffer->exec2_bo_count &&
cmd_buffer->exec2_bos[bo->index] == bo)
return VK_SUCCESS;
- if (cmd_buffer->bo_count >= cmd_buffer->exec2_array_length) {
+ if (cmd_buffer->exec2_bo_count >= cmd_buffer->exec2_array_length) {
uint32_t new_len = cmd_buffer->exec2_objects ?
cmd_buffer->exec2_array_length * 2 : 64;
@@ -534,9 +534,9 @@ anv_cmd_buffer_add_bo(struct anv_cmd_buffer *cmd_buffer,
if (cmd_buffer->exec2_objects) {
memcpy(new_objects, cmd_buffer->exec2_objects,
- cmd_buffer->bo_count * sizeof(*new_objects));
+ cmd_buffer->exec2_bo_count * sizeof(*new_objects));
memcpy(new_bos, cmd_buffer->exec2_bos,
- cmd_buffer->bo_count * sizeof(*new_bos));
+ cmd_buffer->exec2_bo_count * sizeof(*new_bos));
}
cmd_buffer->exec2_objects = new_objects;
@@ -544,9 +544,9 @@ anv_cmd_buffer_add_bo(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->exec2_array_length = new_len;
}
- assert(cmd_buffer->bo_count < cmd_buffer->exec2_array_length);
+ assert(cmd_buffer->exec2_bo_count < cmd_buffer->exec2_array_length);
- bo->index = cmd_buffer->bo_count++;
+ bo->index = cmd_buffer->exec2_bo_count++;
obj = &cmd_buffer->exec2_objects[bo->index];
cmd_buffer->exec2_bos[bo->index] = bo;
@@ -616,7 +616,7 @@ VkResult anv_EndCommandBuffer(
cmd_buffer->surface_relocs.num_relocs - cmd_buffer->surface_batch_bo->first_reloc;
cmd_buffer->surface_batch_bo->length = cmd_buffer->surface_next;
- cmd_buffer->bo_count = 0;
+ cmd_buffer->exec2_bo_count = 0;
cmd_buffer->need_reloc = false;
/* Lock for access to bo->index. */
@@ -650,13 +650,13 @@ VkResult anv_EndCommandBuffer(
anv_cmd_buffer_add_bo(cmd_buffer, &batch_bo->bo,
&batch->relocs.relocs[batch_bo->first_reloc],
batch_bo->num_relocs);
- assert(batch_bo->bo.index == cmd_buffer->bo_count - 1);
+ assert(batch_bo->bo.index == cmd_buffer->exec2_bo_count - 1);
anv_cmd_buffer_process_relocs(cmd_buffer, &cmd_buffer->surface_relocs);
anv_cmd_buffer_process_relocs(cmd_buffer, &batch->relocs);
cmd_buffer->execbuf.buffers_ptr = (uintptr_t) cmd_buffer->exec2_objects;
- cmd_buffer->execbuf.buffer_count = cmd_buffer->bo_count;
+ cmd_buffer->execbuf.buffer_count = cmd_buffer->exec2_bo_count;
cmd_buffer->execbuf.batch_start_offset = 0;
cmd_buffer->execbuf.batch_len = batch->next - batch->start;
cmd_buffer->execbuf.cliprects_ptr = 0;
diff --git a/src/vulkan/aub.c b/src/vulkan/aub.c
index 42d4611eb6e..c33defd48f5 100644
--- a/src/vulkan/aub.c
+++ b/src/vulkan/aub.c
@@ -248,9 +248,9 @@ anv_cmd_buffer_dump(struct anv_cmd_buffer *cmd_buffer)
if (writer == NULL)
return;
- aub_bos = malloc(cmd_buffer->bo_count * sizeof(aub_bos[0]));
+ aub_bos = malloc(cmd_buffer->exec2_bo_count * sizeof(aub_bos[0]));
offset = writer->offset;
- for (uint32_t i = 0; i < cmd_buffer->bo_count; i++) {
+ for (uint32_t i = 0; i < cmd_buffer->exec2_bo_count; i++) {
bo = cmd_buffer->exec2_bos[i];
if (bo->map)
aub_bos[i].map = bo->map;
@@ -282,9 +282,9 @@ anv_cmd_buffer_dump(struct anv_cmd_buffer *cmd_buffer)
bbo->num_relocs, aub_bos);
}
- for (uint32_t i = 0; i < cmd_buffer->bo_count; i++) {
+ for (uint32_t i = 0; i < cmd_buffer->exec2_bo_count; i++) {
bo = cmd_buffer->exec2_bos[i];
- if (i == cmd_buffer->bo_count - 1) {
+ if (i == cmd_buffer->exec2_bo_count - 1) {
assert(bo == &first_bbo->bo);
aub_write_trace_block(writer, AUB_TRACE_TYPE_BATCH,
aub_bos[i].relocated,
diff --git a/src/vulkan/device.c b/src/vulkan/device.c
index c168219a40b..052b725348e 100644
--- a/src/vulkan/device.c
+++ b/src/vulkan/device.c
@@ -751,7 +751,7 @@ VkResult anv_QueueSubmit(
return vk_error(VK_ERROR_UNKNOWN);
}
- for (uint32_t i = 0; i < cmd_buffer->bo_count; i++)
+ for (uint32_t i = 0; i < cmd_buffer->exec2_bo_count; i++)
cmd_buffer->exec2_bos[i]->offset = cmd_buffer->exec2_objects[i].offset;
} else {
*(uint32_t *)queue->completed_serial.map = cmd_buffer->serial;
diff --git a/src/vulkan/private.h b/src/vulkan/private.h
index cfc46ee8f60..9c9190ab62a 100644
--- a/src/vulkan/private.h
+++ b/src/vulkan/private.h
@@ -697,12 +697,12 @@ struct anv_cmd_buffer {
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_exec_object2 * exec2_objects;
+ uint32_t exec2_bo_count;
struct anv_bo ** exec2_bos;
uint32_t exec2_array_length;
bool need_reloc;
uint32_t serial;
- uint32_t bo_count;
struct anv_batch batch;
struct anv_batch_bo * last_batch_bo;
struct anv_batch_bo * surface_batch_bo;