struct nouveau_pushbuf *push = nvc0->base.pushbuf;
boolean rasterizer_discard;
- rasterizer_discard = (!nvc0->fragprog || !nvc0->fragprog->hdr[18]) &&
- !nvc0->zsa->pipe.depth.enabled && !nvc0->zsa->pipe.stencil[0].enabled;
- rasterizer_discard = rasterizer_discard ||
- nvc0->rast->pipe.rasterizer_discard;
+ if (nvc0->rast && nvc0->rast->pipe.rasterizer_discard) {
+ rasterizer_discard = TRUE;
+ } else {
+ boolean zs = nvc0->zsa &&
+ (nvc0->zsa->pipe.depth.enabled || nvc0->zsa->pipe.stencil[0].enabled);
+ rasterizer_discard = !zs &&
+ (!nvc0->fragprog || !nvc0->fragprog->hdr[18]);
+ }
if (rasterizer_discard != nvc0->state.rasterizer_discard) {
nvc0->state.rasterizer_discard = rasterizer_discard;
enum pipe_texture_target target;
struct {
struct pipe_framebuffer_state fb;
+ struct nvc0_rasterizer_stateobj *rast;
struct nvc0_program *vp;
struct nvc0_program *tcp;
struct nvc0_program *tep;
struct nv50_tsc_entry *sampler[2];
uint32_t dirty;
} saved;
+ struct nvc0_rasterizer_stateobj rast;
};
static void
ctx->saved.fb.cbufs[0] = nvc0->framebuffer.cbufs[0];
ctx->saved.fb.zsbuf = nvc0->framebuffer.zsbuf;
+ ctx->saved.rast = nvc0->rast;
+
ctx->saved.vp = nvc0->vertprog;
ctx->saved.tcp = nvc0->tctlprog;
ctx->saved.tep = nvc0->tevlprog;
ctx->saved.gp = nvc0->gmtyprog;
ctx->saved.fp = nvc0->fragprog;
+ nvc0->rast = &ctx->rast;
+
nvc0->vertprog = &blitter->vp;
nvc0->tctlprog = NULL;
nvc0->tevlprog = NULL;
nvc0->framebuffer.cbufs[0] = blit->saved.fb.cbufs[0];
nvc0->framebuffer.zsbuf = blit->saved.fb.zsbuf;
+ nvc0->rast = blit->saved.rast;
+
nvc0->vertprog = blit->saved.vp;
nvc0->tctlprog = blit->saved.tcp;
nvc0->tevlprog = blit->saved.tep;
nvc0->blit->nvc0 = nvc0;
+ nvc0->blit->rast.pipe.gl_rasterization_rules = 1;
+
return TRUE;
}