{
struct fd_context *ctx = fd_context(pctx);
ctx->vtx = hwcso;
- ctx->dirty |= FD_DIRTY_VTX;
+ ctx->dirty |= FD_DIRTY_VTXSTATE;
}
static void
fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
{
struct fd_context *ctx = fd_context(pctx);
- struct pipe_framebuffer_state *fb = &ctx->framebuffer.base;
+ struct pipe_framebuffer_state *fb = &ctx->framebuffer;
struct fd_ringbuffer *ring = ctx->ring;
struct fd_bo *idx_bo = NULL;
enum pc_di_index_size idx_type = INDEX_SIZE_IGN;
uint32_t idx_size, idx_offset;
unsigned buffers;
+ /* if we supported transform feedback, we'd have to disable this: */
+ if (((ctx->scissor.maxx - ctx->scissor.minx) *
+ (ctx->scissor.maxy - ctx->scissor.miny)) == 0) {
+ return;
+ }
+
ctx->needs_flush = true;
if (info->indexed) {
/* and any buffers used, need to be resolved: */
ctx->resolve |= buffers;
- fd_state_emit(pctx, ctx->dirty);
+ if (ctx->dirty & FD_DIRTY_VTXBUF)
+ emit_vertexbufs(ctx, info->count);
- emit_vertexbufs(ctx, info->count);
+ fd_state_emit(pctx, ctx->dirty);
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
- OUT_RING(ring, CP_REG(REG_VGT_INDX_OFFSET));
+ OUT_RING(ring, CP_REG(REG_A2XX_VGT_INDX_OFFSET));
OUT_RING(ring, info->start);
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
- OUT_RING(ring, CP_REG(REG_VGT_VERTEX_REUSE_BLOCK_CNTL));
+ OUT_RING(ring, CP_REG(REG_A2XX_VGT_VERTEX_REUSE_BLOCK_CNTL));
OUT_RING(ring, 0x0000003b);
- OUT_PKT0(ring, REG_TC_CNTL_STATUS, 1);
- OUT_RING(ring, TC_CNTL_STATUS_L2_INVALIDATE);
+ OUT_PKT0(ring, REG_A2XX_TC_CNTL_STATUS, 1);
+ OUT_RING(ring, A2XX_TC_CNTL_STATUS_L2_INVALIDATE);
OUT_PKT3(ring, CP_WAIT_FOR_IDLE, 1);
OUT_RING(ring, 0x0000000);
}
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
- OUT_RING(ring, CP_REG(REG_2010));
+ OUT_RING(ring, CP_REG(REG_A2XX_UNKNOWN_2010));
OUT_RING(ring, 0x00000000);
emit_cacheflush(ring);