mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
freedreno/a3xx: make vs-set point size work
This appears to need the A2XX version of the point list, so select it at draw time if necessary. Experimentally, always using the A2XX version causes hangs when PSIZE isn't actually emitted. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
7fc5da8b93
commit
995f55a6ce
3 changed files with 10 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue