[Mesa-dev] [PATCH v2 5/8] nvc0: Handle ARB_conditional_render_inverted and enable it

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


Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_query.c  | 5 ++---
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
index 50cef1e..71d48f2 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
@@ -542,7 +542,6 @@ nvc0_render_condition(struct pipe_context *pipe,
    struct nouveau_pushbuf *push = nvc0->base.pushbuf;
    struct nvc0_query *q;
    uint32_t cond;
-   boolean negated = FALSE;
    boolean wait =
       mode != PIPE_RENDER_COND_NO_WAIT &&
       mode != PIPE_RENDER_COND_BY_REGION_NO_WAIT;
@@ -561,13 +560,13 @@ nvc0_render_condition(struct pipe_context *pipe,
    /* NOTE: comparison of 2 queries only works if both have completed */
    switch (q->type) {
    case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
-      cond = negated ? NVC0_3D_COND_MODE_EQUAL :
+      cond = condition ? NVC0_3D_COND_MODE_EQUAL :
                        NVC0_3D_COND_MODE_NOT_EQUAL;
       wait = TRUE;
       break;
    case PIPE_QUERY_OCCLUSION_COUNTER:
    case PIPE_QUERY_OCCLUSION_PREDICATE:
-      if (likely(!negated)) {
+      if (likely(!condition)) {
          if (unlikely(q->nesting))
             cond = wait ? NVC0_3D_COND_MODE_NOT_EQUAL :
                           NVC0_3D_COND_MODE_ALWAYS;
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 7c2f11a..84025ef 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -167,13 +167,12 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
    case PIPE_CAP_TEXTURE_GATHER_SM5:
    case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
       return 1;
    case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
       return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
    case PIPE_CAP_COMPUTE:
       return (class_3d == NVE4_3D_CLASS) ? 1 : 0;
-   case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
-     return 0;
 
    /* unsupported caps */
    case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
-- 
1.8.4.5



More information about the mesa-dev mailing list