Mesa (master): i965: Always use the new FS backend on gen6.

Eric Anholt anholt at kemper.freedesktop.org
Mon Oct 11 22:36:17 UTC 2010


Module: Mesa
Branch: master
Commit: bcec03d527561e2df56bf9ebfa250cef56bb732b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcec03d527561e2df56bf9ebfa250cef56bb732b

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Oct 11 15:30:58 2010 -0700

i965: Always use the new FS backend on gen6.

It's now much more correct for gen6 than the old backend, with just 2
regressions I've found (one of which is common with pre-gen6 and will
be fixed by an array splitting IR pass).

This does leave the old Mesa IR backend getting used still when we
don't have GLSL IR, but the plan is to get GLSL IR input to the driver
for the ARB programs and fixed function by the next release.

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 3d53d9d..fd041b8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -91,8 +91,13 @@ GLboolean
 brw_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
 {
    struct intel_context *intel = intel_context(ctx);
-   if (using_new_fs == -1)
-      using_new_fs = getenv("INTEL_NEW_FS") != NULL;
+
+   if (using_new_fs == -1) {
+      if (intel->gen >= 6)
+	 using_new_fs = 1;
+      else
+	 using_new_fs = getenv("INTEL_NEW_FS") != NULL;
+   }
 
    for (unsigned i = 0; i < prog->_NumLinkedShaders; i++) {
       struct brw_shader *shader = (struct brw_shader *)prog->_LinkedShaders[i];




More information about the mesa-commit mailing list