ilo: fix for stencil only rectlist ops
authorChia-I Wu <olvaffe@gmail.com>
Thu, 20 Feb 2014 08:57:05 +0000 (16:57 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 22 Feb 2014 14:45:13 +0000 (22:45 +0800)
3DSTATE_STENCIL_BUFFER inherits some states from 3DSTATE_DEPTH_BUFFER.  We
need to emit both even the surface is stencil only.

src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c

index f7cd0d2119255496687d1a9304796ab08d0cbaad..59623bc0ce48b358c8100b3dfefd97cfb7ac45bd 100644 (file)
@@ -1571,10 +1571,13 @@ gen6_rectlist_wm_depth(struct ilo_3d_pipeline *p,
 {
    gen6_wa_pipe_control_wm_depth_flush(p);
 
-   if (blitter->uses & ILO_BLITTER_USE_FB_DEPTH) {
+   if (blitter->uses & (ILO_BLITTER_USE_FB_DEPTH |
+                        ILO_BLITTER_USE_FB_STENCIL)) {
       gen6_emit_3DSTATE_DEPTH_BUFFER(p->dev,
             &blitter->fb.dst.u.zs, p->cp);
+   }
 
+   if (blitter->uses & ILO_BLITTER_USE_FB_DEPTH) {
       gen6_emit_3DSTATE_HIER_DEPTH_BUFFER(p->dev,
             &blitter->fb.dst.u.zs, p->cp);
    }
index b34589277fb03888053ee945de268dcf9c390b43..a1c85197cba5084375afd59993b4dfca4a6dae71 100644 (file)
@@ -756,10 +756,13 @@ gen7_rectlist_wm_depth(struct ilo_3d_pipeline *p,
 {
    gen7_wa_pipe_control_wm_depth_stall(p, true);
 
-   if (blitter->uses & ILO_BLITTER_USE_FB_DEPTH) {
+   if (blitter->uses & (ILO_BLITTER_USE_FB_DEPTH |
+                        ILO_BLITTER_USE_FB_STENCIL)) {
       gen6_emit_3DSTATE_DEPTH_BUFFER(p->dev,
             &blitter->fb.dst.u.zs, p->cp);
+   }
 
+   if (blitter->uses & ILO_BLITTER_USE_FB_DEPTH) {
       gen6_emit_3DSTATE_HIER_DEPTH_BUFFER(p->dev,
             &blitter->fb.dst.u.zs, p->cp);
    }