i965: Change assertion condition from implicit to explicit
authorChad Versace <chad.versace@intel.com>
Thu, 7 Apr 2011 16:09:38 +0000 (09:09 -0700)
committerChad Versace <chad.versace@intel.com>
Wed, 13 Apr 2011 00:52:09 +0000 (17:52 -0700)
... because grokking explicit assertions requires fewer neurons.

In brw_misc_state.c:emit_depthbuffer, change assertion condition
    tiling != I915_TILING_X && tiling != I915_TILING_NONE
to
    tiling == I915_TILING_Y

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@intel.com>
src/mesa/drivers/dri/i965/brw_misc_state.c

index 74e911b4ddb4ecf2fc9b2e6cc55a1b94566f562a..19eea07ebc6e90d94a19fc0755fe090f1e70da9e 100644 (file)
@@ -248,8 +248,7 @@ static void emit_depthbuffer(struct brw_context *brw)
       }
 
       assert(region->tiling != I915_TILING_X);
-      if (intel->gen >= 6)
-        assert(region->tiling != I915_TILING_NONE);
+      assert(intel->gen < 6 || region->tiling == I915_TILING_Y);
 
       BEGIN_BATCH(len);
       OUT_BATCH(_3DSTATE_DEPTH_BUFFER << 16 | (len - 2));