enum pc_di_vis_cull_mode vismode,
enum pc_di_src_sel src_sel, uint32_t count,
uint32_t instances, enum a4xx_index_size idx_type,
- uint32_t idx_size, uint32_t idx_offset,
+ uint32_t max_indices, uint32_t idx_offset,
struct pipe_resource *idx_buffer)
{
/* for debug after a lock up, write a unique counter value
if (idx_buffer) {
OUT_RING(ring, 0x0); /* XXX */
OUT_RELOC(ring, fd_resource(idx_buffer)->bo, idx_offset, 0, 0);
- OUT_RING (ring, idx_size);
+ OUT_RING (ring, max_indices);
}
emit_marker(ring, 7);
enum pc_di_vis_cull_mode vismode,
enum pc_di_src_sel src_sel, uint32_t count,
uint32_t instances, enum a4xx_index_size idx_type,
- uint32_t idx_size, uint32_t idx_offset,
+ uint32_t max_indices, uint32_t idx_offset,
struct pipe_resource *idx_buffer)
{
/* for debug after a lock up, write a unique counter value
if (idx_buffer) {
OUT_RING(ring, 0x0); /* XXX */
OUT_RELOC(ring, fd_resource(idx_buffer)->bo, idx_offset, 0, 0);
- OUT_RING (ring, idx_size);
+ OUT_RING (ring, max_indices);
}
emit_marker5(ring, 7);
struct pipe_resource *idx_buffer = NULL;
enum a4xx_index_size idx_type;
enum pc_di_src_sel src_sel;
- uint32_t idx_size, idx_offset;
+ uint32_t max_indices, idx_offset;
if (info->indirect) {
struct fd_resource *ind = fd_resource(info->indirect->buffer);
if (info->index_size) {
struct pipe_resource *idx = info->index.resource;
- unsigned max_indicies = idx->width0 / info->index_size;
+ max_indices = idx->width0 / info->index_size;
OUT_PKT7(ring, CP_DRAW_INDX_INDIRECT, 6);
OUT_RINGP(ring, DRAW4(primtype, DI_SRC_SEL_DMA,
&batch->draw_patches);
OUT_RELOC(ring, fd_resource(idx)->bo,
index_offset, 0, 0);
- OUT_RING(ring, A5XX_CP_DRAW_INDX_INDIRECT_3_MAX_INDICES(max_indicies));
+ OUT_RING(ring, A5XX_CP_DRAW_INDX_INDIRECT_3_MAX_INDICES(max_indices));
OUT_RELOC(ring, ind->bo, info->indirect->offset, 0, 0);
} else {
OUT_PKT7(ring, CP_DRAW_INDIRECT, 3);
idx_buffer = info->index.resource;
idx_type = fd4_size2indextype(info->index_size);
- idx_size = info->index_size * info->count;
+ max_indices = idx_buffer->width0 / info->index_size;
idx_offset = index_offset + info->start * info->index_size;
src_sel = DI_SRC_SEL_DMA;
} else {
idx_buffer = NULL;
idx_type = INDEX4_SIZE_32_BIT;
- idx_size = 0;
+ max_indices = 0;
idx_offset = 0;
src_sel = DI_SRC_SEL_AUTO_INDEX;
}
fd5_draw(batch, ring, primtype, vismode, src_sel,
info->count, info->instance_count,
- idx_type, idx_size, idx_offset, idx_buffer);
+ idx_type, max_indices, idx_offset, idx_buffer);
}
#endif /* FD5_DRAW_H_ */
if (info->index_size) {
struct pipe_resource *idx = info->index.resource;
- unsigned max_indicies = (idx->width0 - index_offset) / info->index_size;
+ unsigned max_indices = (idx->width0 - index_offset) / info->index_size;
OUT_PKT(ring, CP_DRAW_INDX_INDIRECT,
pack_CP_DRAW_INDX_OFFSET_0(*draw0),
A5XX_CP_DRAW_INDX_INDIRECT_INDX_BASE(
fd_resource(idx)->bo, index_offset),
- A5XX_CP_DRAW_INDX_INDIRECT_3(.max_indices = max_indicies),
+ A5XX_CP_DRAW_INDX_INDIRECT_3(.max_indices = max_indices),
A5XX_CP_DRAW_INDX_INDIRECT_INDIRECT(
ind->bo, info->indirect->offset)
);
assert(!info->has_user_indices);
struct pipe_resource *idx_buffer = info->index.resource;
- uint32_t idx_size = idx_buffer->width0 - index_offset;
uint32_t idx_offset = index_offset + info->start * info->index_size;
+ unsigned max_indices = (idx_buffer->width0 - index_offset) / info->index_size;
OUT_PKT(ring, CP_DRAW_INDX_OFFSET,
pack_CP_DRAW_INDX_OFFSET_0(*draw0),
CP_DRAW_INDX_OFFSET_3(0),
A5XX_CP_DRAW_INDX_OFFSET_INDX_BASE(
fd_resource(idx_buffer)->bo, idx_offset),
- A5XX_CP_DRAW_INDX_OFFSET_6(.indx_size = idx_size)
+ A5XX_CP_DRAW_INDX_OFFSET_6(.max_indices = max_indices)
);
} else {
OUT_PKT(ring, CP_DRAW_INDX_OFFSET,