[Mesa-dev] [PATCH 2/2] i965: Delete brw->predicate.supported.

Kenneth Graunke kenneth at whitecape.org
Thu Jan 5 19:29:40 UTC 2017


Just check the screen feature bitfield.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_conditional_render.c | 2 +-
 src/mesa/drivers/dri/i965/brw_context.h            | 1 -
 src/mesa/drivers/dri/i965/intel_extensions.c       | 5 -----
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_conditional_render.c b/src/mesa/drivers/dri/i965/brw_conditional_render.c
index 122a4ecc0f6..758d9fb9c32 100644
--- a/src/mesa/drivers/dri/i965/brw_conditional_render.c
+++ b/src/mesa/drivers/dri/i965/brw_conditional_render.c
@@ -99,7 +99,7 @@ brw_begin_conditional_render(struct gl_context *ctx,
    struct brw_query_object *query = (struct brw_query_object *) q;
    bool inverted;
 
-   if (!brw->predicate.supported)
+   if (!can_do_predicate_writes(brw->screen))
       return;
 
    switch (mode) {
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 113974badc8..b088307a972 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1162,7 +1162,6 @@ struct brw_context
 
    struct {
       enum brw_predicate_state state;
-      bool supported;
    } predicate;
 
    int num_atoms[BRW_NUM_PIPELINES];
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 22651de90e5..5a6cdd2e955 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -197,8 +197,6 @@ intelInitExtensions(struct gl_context *ctx)
       }
    }
 
-   brw->predicate.supported = false;
-
    if (brw->gen >= 7) {
       ctx->Extensions.ARB_conservative_depth = true;
       ctx->Extensions.ARB_derivative_control = true;
@@ -233,9 +231,6 @@ intelInitExtensions(struct gl_context *ctx)
             ctx->Extensions.ARB_ES3_1_compatibility =
                brw->gen >= 8 || brw->is_haswell;
          }
-
-         if (can_do_predicate_writes(brw->screen))
-            brw->predicate.supported = true;
       }
    }
 
-- 
2.11.0



More information about the mesa-dev mailing list