FD6_GROUP_RASTERIZER, ENABLE_ALL);
}
- if (dirty & (FD_DIRTY_FRAMEBUFFER | FD_DIRTY_RASTERIZER | FD_DIRTY_PROG)) {
+ if (dirty & (FD_DIRTY_FRAMEBUFFER | FD_DIRTY_RASTERIZER_DISCARD | FD_DIRTY_PROG)) {
struct fd_ringbuffer *ring = fd_submit_new_ringbuffer(
emit->ctx->batch->submit, 5 * 4, FD_RINGBUFFER_STREAMING);
FD_DIRTY_VTXSTATE = BIT(9),
FD_DIRTY_VTXBUF = BIT(10),
FD_DIRTY_MIN_SAMPLES = BIT(11),
-
FD_DIRTY_SCISSOR = BIT(12),
FD_DIRTY_STREAMOUT = BIT(13),
FD_DIRTY_UCP = BIT(14),
/* only used by a2xx.. possibly can be removed.. */
FD_DIRTY_TEXSTATE = BIT(21),
+
+ /* fine grained state changes, for cases where state is not orthogonal
+ * from hw perspective:
+ */
+ FD_DIRTY_RASTERIZER_DISCARD = BIT(24),
};
/* per shader-stage dirty state: */
{
struct fd_context *ctx = fd_context(pctx);
struct pipe_scissor_state *old_scissor = fd_context_get_scissor(ctx);
+ bool discard = ctx->rasterizer && ctx->rasterizer->rasterizer_discard;
ctx->rasterizer = hwcso;
ctx->dirty |= FD_DIRTY_RASTERIZER;
*/
if (old_scissor != fd_context_get_scissor(ctx))
ctx->dirty |= FD_DIRTY_SCISSOR;
+
+ if (ctx->rasterizer && (discard != ctx->rasterizer->rasterizer_discard))
+ ctx->dirty |= FD_DIRTY_RASTERIZER_DISCARD;
}
static void