radeonsi: rename desc_list_byte_size -> vb_desc_list_alloc_size
authorMarek Olšák <marek.olsak@amd.com>
Tue, 7 Jan 2020 23:06:14 +0000 (18:06 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 13 Jan 2020 20:57:07 +0000 (15:57 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/si_cp_dma.c
src/gallium/drivers/radeonsi/si_debug.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state.h

index 974f2b2223834b911839730c71ab191493076933..2ef41e44ded6aeaa80e97abe5d2dfca87f0ea30d 100644 (file)
@@ -433,12 +433,12 @@ static void cik_prefetch_shader_async(struct si_context *sctx,
 
 static void cik_prefetch_VBO_descriptors(struct si_context *sctx)
 {
-       if (!sctx->vertex_elements || !sctx->vertex_elements->desc_list_byte_size)
+       if (!sctx->vertex_elements || !sctx->vertex_elements->vb_desc_list_alloc_size)
                return;
 
        cik_prefetch_TC_L2_async(sctx, &sctx->vb_descriptors_buffer->b.b,
                                 sctx->vb_descriptors_offset,
-                                sctx->vertex_elements->desc_list_byte_size);
+                                sctx->vertex_elements->vb_desc_list_alloc_size);
 }
 
 /**
index 630d749856d3a58795e0acf7d2adf8f2f5235db9..93ecc08b158c4ca1fc50d4a3e48a149da68304d2 100644 (file)
@@ -868,7 +868,7 @@ static void si_dump_descriptors(struct si_context *sctx,
                desc.list = sctx->vb_descriptors_gpu_list;
                desc.gpu_list = sctx->vb_descriptors_gpu_list;
                desc.element_dw_size = 4;
-               desc.num_active_slots = sctx->vertex_elements->desc_list_byte_size / 16;
+               desc.num_active_slots = sctx->vertex_elements->vb_desc_list_alloc_size / 16;
 
                si_dump_descriptor_list(sctx->screen, &desc, name,
                                        " - Vertex buffer", 4, info->num_inputs,
index a4cff7d7ccc8da8cdcc9c1e186a23b260e5d6c1d..76695baa4c3bffe94bbc5b9410c45c3ca0634003 100644 (file)
@@ -1097,8 +1097,6 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
 {
        struct si_vertex_elements *velems = sctx->vertex_elements;
        unsigned i, count;
-       unsigned desc_list_byte_size;
-       unsigned first_vb_use_mask;
        uint32_t *ptr;
 
        if (!sctx->vertex_buffers_dirty || !velems)
@@ -1109,16 +1107,16 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
        if (!count)
                return true;
 
-       desc_list_byte_size = velems->desc_list_byte_size;
-       first_vb_use_mask = velems->first_vb_use_mask;
+       unsigned alloc_size = velems->vb_desc_list_alloc_size;
+       unsigned first_vb_use_mask = velems->first_vb_use_mask;
 
        /* Vertex buffer descriptors are the only ones which are uploaded
         * directly through a staging buffer and don't go through
         * the fine-grained upload path.
         */
        u_upload_alloc(sctx->b.const_uploader, 0,
-                      desc_list_byte_size,
-                      si_optimal_tcc_alignment(sctx, desc_list_byte_size),
+                      alloc_size,
+                      si_optimal_tcc_alignment(sctx, alloc_size),
                       &sctx->vb_descriptors_offset,
                       (struct pipe_resource**)&sctx->vb_descriptors_buffer,
                       (void**)&ptr);
index 4211ef4014a7615f43a65c1d27efa95424330887..6b3a3a3be6b35c71579d362c4f88def6771de9a3 100644 (file)
@@ -4873,7 +4873,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx,
                return NULL;
 
        v->count = count;
-       v->desc_list_byte_size = align(count * 16, SI_CPDMA_ALIGNMENT);
+       v->vb_desc_list_alloc_size = align(count * 16, SI_CPDMA_ALIGNMENT);
 
        for (i = 0; i < count; ++i) {
                const struct util_format_description *desc;
index 0b7881749c83ecff4867d093ea52e2ac038e51e6..ffc65082615a6c465b59720a84bf0a8e3a1ac9e8 100644 (file)
@@ -173,7 +173,7 @@ struct si_vertex_elements
 
        uint16_t                        first_vb_use_mask;
        /* Vertex buffer descriptor list size aligned for optimal prefetch. */
-       uint16_t                        desc_list_byte_size;
+       uint16_t                        vb_desc_list_alloc_size;
        uint16_t                        instance_divisor_is_one; /* bitmask of inputs */
        uint16_t                        instance_divisor_is_fetched;  /* bitmask of inputs */
 };