turnip: Shorten primary_cmd_stream name.
authorBas Nieuwenhuizen <basni@chromium.org>
Thu, 10 Jan 2019 21:07:04 +0000 (22:07 +0100)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 11 Mar 2019 17:01:41 +0000 (10:01 -0700)
It really is too long.

src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_private.h

index 1cfbf1cb96c66c9cacbfd62ac898c24dd82f5946..df72d4a7b317b340fc2ada4a658683d8605426ae 100644 (file)
@@ -395,7 +395,7 @@ tu_create_cmd_buffer(struct tu_device *device,
    }
 
    tu_bo_list_init(&cmd_buffer->bo_list);
-   tu_cmd_stream_init(&cmd_buffer->primary_cmd_stream);
+   tu_cmd_stream_init(&cmd_buffer->cs);
 
    *pCommandBuffer = tu_cmd_buffer_to_handle(cmd_buffer);
 
@@ -412,7 +412,7 @@ tu_cmd_buffer_destroy(struct tu_cmd_buffer *cmd_buffer)
    for (unsigned i = 0; i < VK_PIPELINE_BIND_POINT_RANGE_SIZE; i++)
       free(cmd_buffer->descriptors[i].push_set.set.mapped_ptr);
 
-   tu_cmd_stream_finish(cmd_buffer->device, &cmd_buffer->primary_cmd_stream);
+   tu_cmd_stream_finish(cmd_buffer->device, &cmd_buffer->cs);
    tu_bo_list_destroy(&cmd_buffer->bo_list);
    vk_free(&cmd_buffer->pool->alloc, cmd_buffer);
 }
@@ -423,7 +423,7 @@ tu_reset_cmd_buffer(struct tu_cmd_buffer *cmd_buffer)
    cmd_buffer->record_result = VK_SUCCESS;
 
    tu_bo_list_reset(&cmd_buffer->bo_list);
-   tu_cmd_stream_reset(cmd_buffer->device, &cmd_buffer->primary_cmd_stream);
+   tu_cmd_stream_reset(cmd_buffer->device, &cmd_buffer->cs);
 
    for (unsigned i = 0; i < VK_PIPELINE_BIND_POINT_RANGE_SIZE; i++) {
       cmd_buffer->descriptors[i].dirty = 0;
@@ -550,14 +550,14 @@ tu_BeginCommandBuffer(VkCommandBuffer commandBuffer,
    cmd_buffer->status = TU_CMD_BUFFER_STATUS_RECORDING;
 
    result = tu_cmd_stream_begin(cmd_buffer->device,
-                                &cmd_buffer->primary_cmd_stream, 4096);
+                                &cmd_buffer->cs, 4096);
 
    /* Put some stuff in so we do not have empty command buffers. */
-   OUT_PKT7(&cmd_buffer->primary_cmd_stream, CP_NOP, 4);
-   *cmd_buffer->primary_cmd_stream.cur++ = 0;
-   *cmd_buffer->primary_cmd_stream.cur++ = 0;
-   *cmd_buffer->primary_cmd_stream.cur++ = 0;
-   *cmd_buffer->primary_cmd_stream.cur++ = 0;
+   OUT_PKT7(&cmd_buffer->cs, CP_NOP, 4);
+   *cmd_buffer->cs.cur++ = 0;
+   *cmd_buffer->cs.cur++ = 0;
+   *cmd_buffer->cs.cur++ = 0;
+   *cmd_buffer->cs.cur++ = 0;
    return result;
 }
 
@@ -605,7 +605,7 @@ tu_EndCommandBuffer(VkCommandBuffer commandBuffer)
 {
    TU_FROM_HANDLE(tu_cmd_buffer, cmd_buffer, commandBuffer);
 
-   tu_cmd_stream_end(&cmd_buffer->primary_cmd_stream);
+   tu_cmd_stream_end(&cmd_buffer->cs);
    cmd_buffer->status = TU_CMD_BUFFER_STATUS_EXECUTABLE;
 
    return cmd_buffer->record_result;
index 976fdad1c49b5d85fe9390eb037ca7e458d86cea..6a46786fda3ddc64da5a278f3e70204054ab32d0 100644 (file)
@@ -1195,14 +1195,14 @@ tu_QueueSubmit(VkQueue _queue,
       uint32_t entry_count = 0;
       for(uint32_t j = 0; j < submit->commandBufferCount; ++j) {
          TU_FROM_HANDLE(tu_cmd_buffer, cmdbuf, submit->pCommandBuffers[j]);
-         entry_count += cmdbuf->primary_cmd_stream.entry_count;
+         entry_count += cmdbuf->cs.entry_count;
       }
 
       struct drm_msm_gem_submit_cmd cmds[entry_count];
       uint32_t entry_idx = 0;
       for(uint32_t j = 0; j < submit->commandBufferCount; ++j) {
          TU_FROM_HANDLE(tu_cmd_buffer, cmdbuf, submit->pCommandBuffers[j]);
-         struct tu_cmd_stream *stream = &cmdbuf->primary_cmd_stream;
+         struct tu_cmd_stream *stream = &cmdbuf->cs;
          for (unsigned i = 0; i < stream->entry_count; ++i, ++entry_idx) {
             cmds[entry_idx].type = MSM_SUBMIT_CMD_BUF;
             cmds[entry_idx].submit_idx = tu_bo_list_add(&bo_list, stream->entries[i].bo);
index 01a06423f15a594fa8397dd192d662869d4a35b1..5a9e55aa8efbf5cf16623050da1af250f58d6b84 100644 (file)
@@ -769,7 +769,7 @@ struct tu_cmd_buffer
    struct tu_cmd_buffer_upload upload;
 
    struct tu_bo_list bo_list;
-   struct tu_cmd_stream primary_cmd_stream;
+   struct tu_cmd_stream cs;
 
    VkResult record_result;
 };