[Mesa-dev] [PATCH v2 6/8] nvc0: Fix blits with inverted conditional rendering

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Sun Aug 17 14:15:21 PDT 2014


Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index a29f0cc..622193b 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -1210,6 +1210,8 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
    int64_t du_dx, dv_dy;
    int i;
    uint32_t mode;
+   uint32_t cond = nvc0->cond_cond ? NVC0_2D_COND_MODE_EQUAL :
+                                     NVC0_2D_COND_MODE_NOT_EQUAL;
    uint32_t mask = nv50_blit_eng2d_get_mask(info);
    boolean b;
 
@@ -1236,7 +1238,7 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
    }
 
    if (nvc0->cond_query && info->render_condition_enable)
-      IMMED_NVC0(push, NVC0_2D(COND_MODE), NVC0_2D_COND_MODE_RES_NON_ZERO);
+      IMMED_NVC0(push, NVC0_2D(COND_MODE), cond);
 
    if (mask != 0xffffffff) {
       IMMED_NVC0(push, NVC0_2D(ROP), 0xca); /* DPSDxax */
-- 
1.8.4.5



More information about the mesa-dev mailing list