{ "2d", DEBUG_VERBOSE_2D },
{ "sync", DEBUG_ALWAYS_SYNC },
{ "api", DEBUG_VERBOSE_API },
+ { "fall", DEBUG_VERBOSE_FALL },
{ NULL, 0 }
};
debug_control );
#endif
+ if (driQueryOptionb(&rmesa->optionCache, "no_rast")) {
+ fprintf(stderr, "disabling 3D acceleration\n");
+ FALLBACK(rmesa, R128_FALLBACK_DISABLE, 1);
+ }
+
return GL_TRUE;
}
#define R128_FALLBACK_READ_BUFFER 0x0004
#define R128_FALLBACK_STENCIL 0x0008
#define R128_FALLBACK_RENDER_MODE 0x0010
-#define R128_FALLBACK_MULTIDRAW 0x0020
-#define R128_FALLBACK_LOGICOP 0x0040
-#define R128_FALLBACK_SEP_SPECULAR 0x0080
-#define R128_FALLBACK_BLEND_EQ 0x0100
-#define R128_FALLBACK_BLEND_FUNC 0x0200
-#define R128_FALLBACK_PROJTEX 0x0400
+#define R128_FALLBACK_LOGICOP 0x0020
+#define R128_FALLBACK_SEP_SPECULAR 0x0040
+#define R128_FALLBACK_BLEND_EQ 0x0080
+#define R128_FALLBACK_BLEND_FUNC 0x0100
+#define R128_FALLBACK_PROJTEX 0x0200
+#define R128_FALLBACK_DISABLE 0x0400
/* Use the templated vertex format:
/* ================================================================
* Debugging:
*/
-#define DO_DEBUG 0
+#define DO_DEBUG 1
#define ENABLE_PERF_BOXES 0
#if DO_DEBUG
#define DEBUG_VERBOSE_DRI 0x10
#define DEBUG_VERBOSE_IOCTL 0x20
#define DEBUG_VERBOSE_2D 0x40
+#define DEBUG_VERBOSE_FALL 0x80
#endif
#endif /* __R128_CONTEXT_H__ */
DRI_CONF_SECTION_QUALITY
DRI_CONF_TEXTURE_DEPTH(DRI_CONF_TEXTURE_DEPTH_FB)
DRI_CONF_SECTION_END
-#if ENABLE_PERF_BOXES
DRI_CONF_SECTION_DEBUG
+ DRI_CONF_NO_RAST(false)
+#if ENABLE_PERF_BOXES
DRI_CONF_PERFORMANCE_BOXES(false)
- DRI_CONF_SECTION_END
#endif
+ DRI_CONF_SECTION_END
DRI_CONF_END;
#if ENABLE_PERF_BOXES
-static const GLuint __driNConfigOptions = 3;
+static const GLuint __driNConfigOptions = 4;
#else
-static const GLuint __driNConfigOptions = 2;
+static const GLuint __driNConfigOptions = 3;
#endif
#if 1
/* Transition to/from hardware rasterization. */
/**********************************************************************/
+static const char * const fallbackStrings[] = {
+ "Texture mode",
+ "glDrawBuffer(GL_FRONT_AND_BACK)",
+ "glReadBuffer",
+ "glEnable(GL_STENCIL) without hw stencil buffer",
+ "glRenderMode(selection or feedback)",
+ "glLogicOp (mode != GL_COPY)",
+ "GL_SEPARATE_SPECULAR_COLOR",
+ "glBlendEquation",
+ "glBlendFunc(mode != ADD)",
+ "Projective texture",
+ "Rasterization disable",
+};
+
+
+static const char *getFallbackString(GLuint bit)
+{
+ int i = 0;
+ while (bit > 1) {
+ i++;
+ bit >>= 1;
+ }
+ return fallbackStrings[i];
+}
+
void r128Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
FLUSH_BATCH( rmesa );
_swsetup_Wakeup( ctx );
rmesa->RenderIndex = ~0;
+ if ( R128_DEBUG & DEBUG_VERBOSE_FALL ) {
+ fprintf(stderr, "R128 begin rasterization fallback: 0x%x %s\n",
+ bit, getFallbackString(bit));
+ }
}
}
else {
rmesa->hw_viewport, 0 );
rmesa->NewGLState |= _R128_NEW_RENDER_STATE;
+ if ( R128_DEBUG & DEBUG_VERBOSE_FALL ) {
+ fprintf(stderr, "R128 end rasterization fallback: 0x%x %s\n",
+ bit, getFallbackString(bit));
+ }
}
}
}
rmesa->tnl_state = -1;
rmesa->NewGLState |= _R128_NEW_RENDER_STATE;
-
-/* r128Fallback( ctx, 0x100000, 1 ); */
}