diff options
author | Dave Airlie <airlied@linux.ie> | 2009-01-15 16:41:01 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-01-15 16:45:39 +1000 |
commit | 1a51b76343255af9be6282f93614e92788ad4f0f (patch) | |
tree | 38a4343beb7f01ede1c291347b16143522bbee13 /src/mesa/drivers/dri/radeon/common_misc.c | |
parent | 0c0a55a21158e1f97cf140c0a1c0531c06751873 (diff) |
radeon/r200/r300: start to make cmd buf useful
Diffstat (limited to 'src/mesa/drivers/dri/radeon/common_misc.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/common_misc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_misc.c b/src/mesa/drivers/dri/radeon/common_misc.c index 7078757261..a234352658 100644 --- a/src/mesa/drivers/dri/radeon/common_misc.c +++ b/src/mesa/drivers/dri/radeon/common_misc.c @@ -64,6 +64,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "common_context.h" #include "common_misc.h" #include "common_lock.h" +#include "common_cmdbuf.h" #ifndef RADEON_DEBUG int RADEON_DEBUG = (0); @@ -687,3 +688,18 @@ void rcommonDestroyCmdBuf(radeonContextPtr rmesa) radeon_cs_manager_legacy_dtor(rmesa->cmdbuf.csm); } } + +void rcommonBeginBatch(radeonContextPtr rmesa, int n, + int dostate, + const char *file, + const char *function, + int line) +{ + rcommonEnsureCmdBufSpace(rmesa, n, function); + if (!rmesa->cmdbuf.cs->cdw && dostate) { + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "Reemit state after flush (from %s)\n", function); + rmesa->vtbl.emit_state(rmesa); + } + radeon_cs_begin(rmesa->cmdbuf.cs, n, file, function, line); +} |