static const struct debug_named_value debug_options[] = {
{ "fp", DBG_FP, "Fragment program handling (for debugging)" },
{ "vp", DBG_VP, "Vertex program handling (for debugging)" },
- { "draw", DBG_DRAW, "Draw and emit (for debugging)" },
+ { "draw", DBG_DRAW, "Draw calls (for debugging)" },
+ { "swtcl", DBG_SWTCL, "SWTCL-specific info (for debugging)" },
+ { "rsblock", DBG_RS_BLOCK, "Rasterizer registers (for debugging)" },
+ { "psc", DBG_PSC, "Vertex stream registers (for debugging)" },
{ "tex", DBG_TEX, "Textures (for debugging)" },
{ "texalloc", DBG_TEXALLOC, "Texture allocation (for debugging)" },
{ "fall", DBG_FALL, "Fallbacks (for debugging)" },
{ "rs", DBG_RS, "Rasterizer (for debugging)" },
{ "fb", DBG_FB, "Framebuffer (for debugging)" },
+ { "fakeocc", DBG_FAKE_OCC, "Use fake occlusion queries (for debugging)" },
{ "anisohq", DBG_ANISOHQ, "High quality anisotropic filtering (for benchmarking)" },
{ "notiling", DBG_NO_TILING, "Disable tiling (for benchmarking)" },
{ "noimmd", DBG_NO_IMMD, "Disable immediate mode (for benchmarking)" },
- { "fakeocc", DBG_FAKE_OCC, "Use fake occlusion queries (for lulz)" },
- { "stats", DBG_STATS, "Gather statistics (for lulz)" },
+ { "stats", DBG_STATS, "Gather statistics" },
/* must be last */
DEBUG_NAMED_VALUE_END
unsigned count = (rs->inst_count & R300_RS_INST_COUNT_MASK) + 1;
CS_LOCALS(r300);
- if (SCREEN_DBG_ON(r300->screen, DBG_DRAW)) {
+ if (DBG_ON(r300, DBG_RS_BLOCK)) {
r500_dump_rs_block(rs);
fprintf(stderr, "r300: RS emit:\n");
{
CS_LOCALS(r300);
- DBG(r300, DBG_DRAW, "r300: Preparing vertex buffer %p for render, "
+ DBG(r300, DBG_SWTCL, "r300: Preparing vertex buffer %p for render, "
"vertex size %d\n", r300->vbo,
r300->vertex_info.size);
/* Set the pointer to our vertex buffer. The emitted values are this:
unsigned i;
CS_LOCALS(r300);
- if (DBG_ON(r300, DBG_DRAW)) {
+ if (DBG_ON(r300, DBG_PSC)) {
fprintf(stderr, "r300: PSC emit:\n");
for (i = 0; i < streams->count; i++) {
unsigned dwords = 6;
CS_LOCALS(r300);
-
(void) i; (void) ptr;
r300_prepare_for_rendering(r300, PREP_FIRST_DRAW | PREP_EMIT_AOS_SWTCL,
NULL, dwords, 0, 0, NULL);
- DBG(r300, DBG_DRAW, "r300: Doing vbuf render, count %d\n", count);
+ DBG(r300, DBG_DRAW, "r300: render_draw_arrays (count: %d)\n", count);
/* Uncomment to dump all VBOs rendered through this interface.
* Slow and noisy!
unsigned free_dwords;
CS_LOCALS(r300);
+ DBG(r300, DBG_DRAW, "r300: render_draw_elements (count: %d)\n", count);
/* Reserve at least 256 dwords.
*
r300_prepare_for_rendering(r300, PREP_FIRST_DRAW, NULL, dwords, 0, 0, NULL);
+ DBG(r300, DBG_DRAW, "r300: draw_rectangle\n");
+
BEGIN_CS_AS_CB(r300, dwords);
/* Set up GA. */
OUT_CB_REG(R300_GA_POINT_SIZE, (height * 6) | ((width * 6) << 16));
* those changes.
*/
/*@{*/
-#define DBG_HELP (1 << 0)
+
/* Logging. */
+#define DBG_PSC (1 << 0)
#define DBG_FP (1 << 1)
#define DBG_VP (1 << 2)
-/* The bit (1 << 3) is unused. */
+#define DBG_SWTCL (1 << 3)
#define DBG_DRAW (1 << 4)
#define DBG_TEX (1 << 5)
#define DBG_TEXALLOC (1 << 6)
#define DBG_RS (1 << 7)
#define DBG_FALL (1 << 8)
#define DBG_FB (1 << 9)
+#define DBG_RS_BLOCK (1 << 10)
/* Features. */
#define DBG_ANISOHQ (1 << 16)
#define DBG_NO_TILING (1 << 17)
/* WPOS. */
if (r300_fs(r300)->shader->inputs.wpos != ATTR_UNUSED && gen_count < 8) {
- DBG(r300, DBG_DRAW, "draw_emit_attrib: WPOS, index: %i\n",
+ DBG(r300, DBG_SWTCL, "draw_emit_attrib: WPOS, index: %i\n",
vs_outputs->wpos);
r300_draw_emit_attrib(r300, EMIT_4F, INTERP_PERSPECTIVE,
vs_outputs->wpos);
/* For each Draw attribute, route it to the fragment shader according
* to the vs_output_tab. */
attrib_count = vinfo->num_attribs;
- DBG(r300, DBG_DRAW, "r300: attrib count: %d\n", attrib_count);
+ DBG(r300, DBG_SWTCL, "r300: attrib count: %d\n", attrib_count);
for (i = 0; i < attrib_count; i++) {
- DBG(r300, DBG_DRAW, "r300: attrib: index %d, interp %d, emit %d,"
- " vs_output_tab %d\n", vinfo->attrib[i].src_index,
- vinfo->attrib[i].interp_mode, vinfo->attrib[i].emit,
- vs_output_tab[i]);
-
if (vs_output_tab[i] == -1) {
assert(0);
abort();
format = draw_translate_vinfo_format(vinfo->attrib[i].emit);
+ DBG(r300, DBG_SWTCL,
+ "r300: swtcl_vertex_psc [%i] <- %s\n",
+ vs_output_tab[i], util_format_short_name(format));
+
/* Obtain the type of data in this attribute. */
type = r300_translate_vertex_data_type(format);
if (type == R300_INVALID_FORMAT) {