From 02df36f394da4f699b4841c279a6b573fcb7c32b Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 8 Sep 2006 10:36:32 +0000 Subject: Basic facility for playing back captured aubfiles. Requires a small hack to the drm to disable command verification on the cmd_buffer ioctl. Doesn't exactly replay as commands are normally delivered as batchbuffers but are captured and replayed as commands on the ring. --- src/mesa/drivers/dri/i965/bufmgr_fake.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mesa/drivers/dri/i965/bufmgr_fake.c') diff --git a/src/mesa/drivers/dri/i965/bufmgr_fake.c b/src/mesa/drivers/dri/i965/bufmgr_fake.c index 67fa7c8e2e..40e9239883 100644 --- a/src/mesa/drivers/dri/i965/bufmgr_fake.c +++ b/src/mesa/drivers/dri/i965/bufmgr_fake.c @@ -650,6 +650,21 @@ static struct buffer *do_GenBuffer(struct intel_context *intel, const char *name return buf; } + +void *bmFindVirtual( struct intel_context *intel, + unsigned int offset, + size_t sz ) +{ + struct bufmgr *bm = intel->bm; + int i; + + for (i = 0; i < bm->nr_pools; i++) + if (offset >= bm->pool[i].low_offset && + offset + sz <= bm->pool[i].low_offset + bm->pool[i].size) + return bm->pool[i].virtual + offset; + + return NULL; +} void bmGenBuffers(struct intel_context *intel, -- cgit v1.2.3