i965: clip: Remove no-longer-needed variables.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_fallback.c
index 5f4f2d515dff9ea227b9c986ef184fdb59168727..d0b0c22abf6d5f66ee70d089b9d8cb361d553c39 100644 (file)
 #include "swrast/swrast.h"
 #include "tnl/tnl.h"
 #include "brw_context.h"
-#include "brw_fallback.h"
-
-#include "glapi/glapi.h"
 
 #define FILE_DEBUG_FLAG DEBUG_FALLBACKS
 
 static GLboolean do_check_fallback(struct brw_context *brw)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
    GLuint i;
 
    if (brw->intel.no_rast) {
@@ -64,23 +61,14 @@ static GLboolean do_check_fallback(struct brw_context *brw)
    for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
       struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
       if (texUnit->_ReallyEnabled) {
-        struct intel_texture_object *intelObj = intel_texture_object(texUnit->_Current);
-        struct gl_texture_image *texImage = intelObj->base.Image[0][intelObj->firstLevel];
+        struct gl_texture_object *tex_obj = texUnit->_Current;
+        struct gl_texture_image *texImage = tex_obj->Image[0][tex_obj->BaseLevel];
         if (texImage->Border) {
            DBG("FALLBACK: texture border\n");
            return GL_TRUE;
         }
       }
    }
-   
-   /* _NEW_STENCIL 
-    */
-   if (ctx->Stencil.Enabled &&
-       (ctx->DrawBuffer->Name == 0 && !brw->intel.hw_stencil)) {
-      DBG("FALLBACK: stencil\n");
-      return GL_TRUE;
-   }
-
 
    return GL_FALSE;
 }
@@ -92,7 +80,7 @@ static void check_fallback(struct brw_context *brw)
 
 const struct brw_tracked_state brw_check_fallback = {
    .dirty = {
-      .mesa = _NEW_BUFFERS | _NEW_RENDERMODE | _NEW_TEXTURE | _NEW_STENCIL,
+      .mesa = _NEW_RENDERMODE | _NEW_TEXTURE | _NEW_STENCIL,
       .brw  = 0,
       .cache = 0
    },
@@ -102,7 +90,11 @@ const struct brw_tracked_state brw_check_fallback = {
 
 
 
-/* Not used:
+/**
+ * Called by the INTEL_FALLBACK() macro.
+ * NOTE: this is a no-op for the i965 driver.  The brw->intel.Fallback
+ * field is treated as a boolean, not a bitmask.  It's only set in a
+ * couple of places.
  */
 void intelFallback( struct intel_context *intel, GLuint bit, GLboolean mode )
 {