gallium: Add a pipe cap for whether primitive restart works for patches.
[mesa.git] / src / gallium / drivers / i915 / i915_debug.c
index 87c435a2f364c0d98ff2064e81276a1f18d3f7a6..19f887bab8ca6591b6a8603330cdaf155170e78a 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
  * 
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2003 VMware, Inc.
  * All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -18,7 +18,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -46,12 +46,18 @@ static const struct debug_named_value debug_options[] = {
 };
 
 unsigned i915_debug = 0;
-boolean i915_tiling = TRUE;
 
-void i915_debug_init(struct i915_screen *screen)
+DEBUG_GET_ONCE_FLAGS_OPTION(i915_debug, "I915_DEBUG", debug_options, 0)
+DEBUG_GET_ONCE_BOOL_OPTION(i915_no_tiling, "I915_NO_TILING", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(i915_lie, "I915_LIE", TRUE)
+DEBUG_GET_ONCE_BOOL_OPTION(i915_use_blitter, "I915_USE_BLITTER", FALSE)
+
+void i915_debug_init(struct i915_screen *is)
 {
-   i915_debug = debug_get_flags_option("I915_DEBUG", debug_options, 0);
-   i915_tiling = !debug_get_bool_option("I915_NO_TILING", FALSE);
+   i915_debug = debug_get_option_i915_debug();
+   is->debug.tiling = !debug_get_option_i915_no_tiling();
+   is->debug.lie = debug_get_option_i915_lie();
+   is->debug.use_blitter = debug_get_option_i915_use_blitter();
 }
 
 
@@ -226,7 +232,7 @@ BITS(
                         ... )
 {
    va_list  args;
-   unsigned himask = ~0UL >> (31 - (hi));
+   unsigned himask = 0xFFFFFFFFUL >> (31 - (hi));
 
    PRINTF(stream, "\t\t ");
 
@@ -907,7 +913,7 @@ i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
       debug_printf( "\n\nBATCH: ???\n");
       return;
    }
-   
+
    debug_printf( "\n\nBATCH: (%d)\n", (int)bytes / 4);
 
    while (!done &&
@@ -916,8 +922,7 @@ i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
       if (!i915_debug_packet( &stream ))
         break;
 
-      assert(stream.offset <= bytes &&
-            stream.offset >= 0);
+      assert(stream.offset <= bytes);
    }
 
    debug_printf( "END-BATCH\n\n\n");
@@ -948,7 +953,8 @@ i915_dump_dirty(struct i915_context *i915, const char *func)
       {I915_NEW_DEPTH_STENCIL, "depth_stencil"},
       {I915_NEW_SAMPLER,       "sampler"},
       {I915_NEW_SAMPLER_VIEW,  "sampler_view"},
-      {I915_NEW_CONSTANTS,     "constants"},
+      {I915_NEW_VS_CONSTANTS,  "vs_const"},
+      {I915_NEW_FS_CONSTANTS,  "fs_const"},
       {I915_NEW_VBO,           "vbo"},
       {I915_NEW_VS,            "vs"},
       {0, NULL},