Browse Source

r300g: inline FLUSH_CS

The fewer macros, the better.
tags/mesa-7.9-rc1
Marek Olšák 15 years ago
parent
commit
7ca24dfa6d
2 changed files with 4 additions and 10 deletions
  1. 0
    7
      src/gallium/drivers/r300/r300_cs.h
  2. 4
    3
      src/gallium/drivers/r300/r300_flush.c

+ 0
- 7
src/gallium/drivers/r300/r300_cs.h View File

cs_winsys->end_cs(cs_winsys, __FILE__, __FUNCTION__, __LINE__); \ cs_winsys->end_cs(cs_winsys, __FILE__, __FUNCTION__, __LINE__); \
} while (0) } while (0)


#define FLUSH_CS do { \
if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { \
r300->flush_counter++; \
} \
cs_winsys->flush_cs(cs_winsys); \
} while (0)



/** /**
* Writing pure DWORDs. * Writing pure DWORDs.

+ 4
- 3
src/gallium/drivers/r300/r300_flush.c View File

struct r300_atom *atom; struct r300_atom *atom;
struct r300_fence **rfence = (struct r300_fence**)fence; struct r300_fence **rfence = (struct r300_fence**)fence;


CS_LOCALS(r300);
(void) cs_count;
/* We probably need to flush Draw, but we may have been called from /* We probably need to flush Draw, but we may have been called from
* within Draw. This feels kludgy, but it might be the best thing. * within Draw. This feels kludgy, but it might be the best thing.
* *
if (r300->dirty_hw) { if (r300->dirty_hw) {
r300_emit_query_end(r300); r300_emit_query_end(r300);


FLUSH_CS;
if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
r300->flush_counter++;
}
r300->rws->flush_cs(r300->rws);
r300->dirty_hw = 0; r300->dirty_hw = 0;


/* New kitchen sink, baby. */ /* New kitchen sink, baby. */

Loading…
Cancel
Save