diff options
author | Marek Olšák <[email protected]> | 2010-06-13 00:31:04 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-06-13 17:43:38 +0200 |
commit | a062156bb27d604abb19b4ad6a3668c42b1334ab (patch) | |
tree | 3fbe00aa905a4294157f18f883240088f2d91d9e /src/gallium/drivers/r300/r300_cs.h | |
parent | 7ca24dfa6daead4722d03d9a947f1e049b9c7d38 (diff) |
r300g: add API for building command buffers
The idea is to build a hardware command buffer for every CSO and memcpy
the buffer to a command stream at bind time (or dirty-state-emission time,
to be precise).
Diffstat (limited to 'src/gallium/drivers/r300/r300_cs.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_cs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h index 1cdd4b82caa..1649766989d 100644 --- a/src/gallium/drivers/r300/r300_cs.h +++ b/src/gallium/drivers/r300/r300_cs.h @@ -56,6 +56,7 @@ if (cs_count != 0) \ debug_printf("r300: Warning: cs_count off by %d\n", cs_count); \ cs_winsys->end_cs(cs_winsys, __FILE__, __FUNCTION__, __LINE__); \ + cs_count = 0; \ } while (0) @@ -137,4 +138,15 @@ cs_count -= 4; \ } while (0) + +/** + * Command buffer emission. + */ + +/* It's recommended not to call begin_cs/end_cs before/after this macro. */ +#define WRITE_CS_TABLE(values, count) do { \ + assert(cs_count == 0); \ + cs_winsys->write_cs_table(cs_winsys, values, count); \ +} while (0) + #endif /* R300_CS_H */ |