diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_draw.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.h | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c index dfc7202c446..f2efd5f2eb0 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c @@ -107,7 +107,8 @@ fd2_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info) OUT_RING(ring, info->max_index); /* VGT_MAX_VTX_INDX */ OUT_RING(ring, info->min_index); /* VGT_MIN_VTX_INDX */ - fd_draw_emit(ctx, ring, IGNORE_VISIBILITY, info); + fd_draw_emit(ctx, ring, ctx->primtypes[info->mode], + IGNORE_VISIBILITY, info); OUT_PKT3(ring, CP_SET_CONSTANT, 2); OUT_RING(ring, CP_REG(REG_A2XX_UNKNOWN_2010)); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c index 179bf9ce92d..48dd8da782a 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c @@ -58,6 +58,7 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring, struct fd3_emit *emit) { const struct pipe_draw_info *info = emit->info; + enum pc_di_primtype primtype = ctx->primtypes[info->mode]; fd3_emit_state(ctx, ring, emit); @@ -77,7 +78,12 @@ draw_impl(struct fd_context *ctx, struct fd_ringbuffer *ring, OUT_RING(ring, info->primitive_restart ? /* PC_RESTART_INDEX */ info->restart_index : 0xffffffff); + if (ctx->rasterizer && ctx->rasterizer->point_size_per_vertex && + info->mode == PIPE_PRIM_POINTS) + primtype = DI_PT_POINTLIST_A2XX; + fd_draw_emit(ctx, ring, + primtype, emit->key.binning_pass ? IGNORE_VISIBILITY : USE_VISIBILITY, info); } diff --git a/src/gallium/drivers/freedreno/freedreno_draw.h b/src/gallium/drivers/freedreno/freedreno_draw.h index 25e102f5067..3224fb14652 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.h +++ b/src/gallium/drivers/freedreno/freedreno_draw.h @@ -113,6 +113,7 @@ size2indextype(unsigned index_size) /* this is same for a2xx/a3xx, so split into helper: */ static inline void fd_draw_emit(struct fd_context *ctx, struct fd_ringbuffer *ring, + enum pc_di_primtype primtype, enum pc_di_vis_cull_mode vismode, const struct pipe_draw_info *info) { @@ -138,7 +139,7 @@ fd_draw_emit(struct fd_context *ctx, struct fd_ringbuffer *ring, src_sel = DI_SRC_SEL_AUTO_INDEX; } - fd_draw(ctx, ring, ctx->primtypes[info->mode], vismode, src_sel, + fd_draw(ctx, ring, primtype, vismode, src_sel, info->count, info->instance_count - 1, idx_type, idx_size, idx_offset, idx_bo); } |