const struct pipe_vertex_buffer *vb)
{
struct fd_context *ctx = fd_context(pctx);
- struct fd_vertexbuf_stateobj *so = &ctx->vertexbuf;
+ struct fd_vertexbuf_stateobj *so = &ctx->vtx.vertexbuf;
int i;
/* on a2xx, pitch is encoded in the vtx fetch instruction, so
fd_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso)
{
struct fd_context *ctx = fd_context(pctx);
+ struct pipe_scissor_state *old_scissor = fd_context_get_scissor(ctx);
+
ctx->rasterizer = hwcso;
ctx->dirty |= FD_DIRTY_RASTERIZER;
+
+ /* if scissor enable bit changed we need to mark scissor
+ * state as dirty as well:
+ * NOTE: we can do a shallow compare, since we only care
+ * if it changed to/from &ctx->disable_scissor
+ */
+ if (old_scissor != fd_context_get_scissor(ctx))
+ ctx->dirty |= FD_DIRTY_SCISSOR;
}
static void
fd_vertex_state_bind(struct pipe_context *pctx, void *hwcso)
{
struct fd_context *ctx = fd_context(pctx);
- ctx->vtx = hwcso;
+ ctx->vtx.vtx = hwcso;
ctx->dirty |= FD_DIRTY_VTXSTATE;
}