[Mesa-dev] [PATCH 4/4] i965/gen7: Enable transform feedback as long as kernel support is present.

Eric Anholt eric at anholt.net
Mon Jan 2 11:37:47 PST 2012


The last major issue (intervening-read) is fixed, so let's turn this
on for real.  The only other known issue is a hardware limitation for
tesselation with flat shading.
---
 src/mesa/drivers/dri/intel/intel_extensions.c |    3 ++-
 src/mesa/drivers/dri/intel/intel_screen.c     |    4 ++++
 src/mesa/drivers/dri/intel/intel_screen.h     |    2 ++
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 09ee9ba..d3c497c 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -104,7 +104,8 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Const.GLSLVersion = 120;
    _mesa_override_glsl_version(ctx);
 
-   if (intel->gen == 6 || (intel->gen == 7 && override_version >= 30))
+   if (intel->gen == 6 ||
+       (intel->gen == 7 && intel->intelScreen->kernel_has_gen7_sol_reset))
       ctx->Extensions.EXT_transform_feedback = true;
 
    if (intel->gen >= 5)
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index e4cc5b0..ecc08fd 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -671,6 +671,10 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
       intelScreen->deviceID = strtod(devid_override, NULL);
    }
 
+   intelScreen->kernel_has_gen7_sol_reset =
+      intel_get_boolean(intelScreen->driScrnPriv,
+			I915_PARAM_HAS_GEN7_SOL_RESET);
+
    if (IS_GEN7(intelScreen->deviceID)) {
       intelScreen->gen = 7;
    } else if (IS_GEN6(intelScreen->deviceID)) {
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index 63c58df..6c6b516 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -114,6 +114,8 @@ struct intel_screen
    bool hw_has_hiz;
    enum intel_dri2_has_hiz dri2_has_hiz;
 
+   bool kernel_has_gen7_sol_reset;
+
    bool no_vbo;
    dri_bufmgr *bufmgr;
    struct _mesa_HashTable *named_regions;
-- 
1.7.7.3



More information about the mesa-dev mailing list