{
struct r300_context* r300 = r300_context(context);
struct r300_query* query, * temp;
+ struct r300_atom *atom;
util_blitter_destroy(r300->blitter);
draw_destroy(r300->draw);
+ /* Print stats, if enabled. */
+ if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
+ fprintf(stderr, "r300: Stats for context %p:\n", r300);
+ fprintf(stderr, " : Flushes: %llu\n", r300->flush_counter);
+ foreach(atom, &r300->atom_list) {
+ fprintf(stderr, " : %s: %llu emits\n",
+ atom->name, atom->counter);
+ }
+ }
+
/* Free the OQ BO. */
context->screen->resource_destroy(context->screen, r300->oqbo);
struct r300_atom *prev, *next;
/* Name, for debugging. */
const char* name;
+ /* Stat counter. */
+ uint64_t counter;
/* Opaque state. */
void* state;
/* Emit the state to the context. */
/* upload managers */
struct u_upload_mgr *upload_vb;
struct u_upload_mgr *upload_ib;
+
+ /* Stat counter. */
+ uint64_t flush_counter;
};
/* Convenience cast wrapper. */
DBG(cs_context_copy, DBG_CS, "r300: FLUSH_CS in %s (%s:%d)\n\n", __FUNCTION__, \
__FILE__, __LINE__); \
} \
+ if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { \
+ r300->flush_counter++; \
+ } \
cs_winsys->flush_cs(cs_winsys); \
} while (0)
foreach(atom, &r300->atom_list) {
if (atom->dirty) {
atom->emit(r300, atom->size, atom->state);
+ if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
+ atom->counter++;
+ }
atom->dirty = FALSE;
}
}