radeonsi: rename desc_list_byte_size -> vb_desc_list_alloc_size

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
Marek Olšák 2020-01-07 18:06:14 -05:00
parent 2cc14bd7b8
commit 1e03b63b3b
5 changed files with 9 additions and 11 deletions

View 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) 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; return;
cik_prefetch_TC_L2_async(sctx, &sctx->vb_descriptors_buffer->b.b, cik_prefetch_TC_L2_async(sctx, &sctx->vb_descriptors_buffer->b.b,
sctx->vb_descriptors_offset, sctx->vb_descriptors_offset,
sctx->vertex_elements->desc_list_byte_size); sctx->vertex_elements->vb_desc_list_alloc_size);
} }
/** /**

View File

@ -868,7 +868,7 @@ static void si_dump_descriptors(struct si_context *sctx,
desc.list = sctx->vb_descriptors_gpu_list; desc.list = sctx->vb_descriptors_gpu_list;
desc.gpu_list = sctx->vb_descriptors_gpu_list; desc.gpu_list = sctx->vb_descriptors_gpu_list;
desc.element_dw_size = 4; 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, si_dump_descriptor_list(sctx->screen, &desc, name,
" - Vertex buffer", 4, info->num_inputs, " - Vertex buffer", 4, info->num_inputs,

View File

@ -1097,8 +1097,6 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
{ {
struct si_vertex_elements *velems = sctx->vertex_elements; struct si_vertex_elements *velems = sctx->vertex_elements;
unsigned i, count; unsigned i, count;
unsigned desc_list_byte_size;
unsigned first_vb_use_mask;
uint32_t *ptr; uint32_t *ptr;
if (!sctx->vertex_buffers_dirty || !velems) if (!sctx->vertex_buffers_dirty || !velems)
@ -1109,16 +1107,16 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
if (!count) if (!count)
return true; return true;
desc_list_byte_size = velems->desc_list_byte_size; unsigned alloc_size = velems->vb_desc_list_alloc_size;
first_vb_use_mask = velems->first_vb_use_mask; unsigned first_vb_use_mask = velems->first_vb_use_mask;
/* Vertex buffer descriptors are the only ones which are uploaded /* Vertex buffer descriptors are the only ones which are uploaded
* directly through a staging buffer and don't go through * directly through a staging buffer and don't go through
* the fine-grained upload path. * the fine-grained upload path.
*/ */
u_upload_alloc(sctx->b.const_uploader, 0, u_upload_alloc(sctx->b.const_uploader, 0,
desc_list_byte_size, alloc_size,
si_optimal_tcc_alignment(sctx, desc_list_byte_size), si_optimal_tcc_alignment(sctx, alloc_size),
&sctx->vb_descriptors_offset, &sctx->vb_descriptors_offset,
(struct pipe_resource**)&sctx->vb_descriptors_buffer, (struct pipe_resource**)&sctx->vb_descriptors_buffer,
(void**)&ptr); (void**)&ptr);

View File

@ -4873,7 +4873,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx,
return NULL; return NULL;
v->count = count; 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) { for (i = 0; i < count; ++i) {
const struct util_format_description *desc; const struct util_format_description *desc;

View File

@ -173,7 +173,7 @@ struct si_vertex_elements
uint16_t first_vb_use_mask; uint16_t first_vb_use_mask;
/* Vertex buffer descriptor list size aligned for optimal prefetch. */ /* 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_one; /* bitmask of inputs */
uint16_t instance_divisor_is_fetched; /* bitmask of inputs */ uint16_t instance_divisor_is_fetched; /* bitmask of inputs */
}; };