summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2017-05-31 21:18:38 -0700
committerMatt Turner <[email protected]>2017-06-06 11:47:47 -0700
commitbc17155fd0e6cb3ec0a19ffbe39f0c981ef48d4f (patch)
treeb71967307438de2a8077373cbc2dbbb5216aac81
parente0a9b261e5938e121304ba3bde4423bee3496752 (diff)
i965: Remove brw_bo_map_unsynchronized()
Call brw_bo_map() directly. Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.c20
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_program_cache.c4
3 files changed, 2 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 15610dba5b9..9475d2b30ac 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -755,26 +755,6 @@ brw_bo_map_gtt(struct brw_context *brw, struct brw_bo *bo, unsigned flags)
return bo->map_gtt;
}
-/**
- * Performs a mapping of the buffer object like the normal GTT
- * mapping, but avoids waiting for the GPU to be done reading from or
- * rendering to the buffer.
- *
- * This is used in the implementation of GL_ARB_map_buffer_range: The
- * user asks to create a buffer, then does a mapping, fills some
- * space, runs a drawing command, then asks to map it again without
- * synchronizing because it guarantees that it won't write over the
- * data that the GPU is busy using (or, more specifically, that if it
- * does write over the data, it acknowledges that rendering is
- * undefined).
- */
-
-void *
-brw_bo_map_unsynchronized(struct brw_context *brw, struct brw_bo *bo)
-{
- return brw_bo_map_gtt(brw, bo, MAP_READ | MAP_WRITE | MAP_ASYNC);
-}
-
static bool
can_map_cpu(struct brw_bo *bo, unsigned flags)
{
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index 099afcf4c57..a11599ff79b 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -262,7 +262,6 @@ struct brw_bo *brw_bo_gem_create_from_name(struct brw_bufmgr *bufmgr,
const char *name,
unsigned int handle);
void brw_bufmgr_enable_reuse(struct brw_bufmgr *bufmgr);
-MUST_CHECK void *brw_bo_map_unsynchronized(struct brw_context *brw, struct brw_bo *bo);
int brw_bo_wait(struct brw_bo *bo, int64_t timeout_ns);
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index ab03969db91..2fd989a41c9 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -220,7 +220,7 @@ brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
if (can_do_exec_capture(brw->screen))
new_bo->kflags = EXEC_OBJECT_CAPTURE;
if (brw->has_llc)
- llc_map = brw_bo_map_unsynchronized(brw, new_bo);
+ llc_map = brw_bo_map(brw, new_bo, MAP_READ | MAP_ASYNC);
/* Copy any existing data that needs to be saved. */
if (cache->next_offset != 0) {
@@ -417,7 +417,7 @@ brw_init_caches(struct brw_context *brw)
if (can_do_exec_capture(brw->screen))
cache->bo->kflags = EXEC_OBJECT_CAPTURE;
if (brw->has_llc)
- cache->map = brw_bo_map_unsynchronized(brw, cache->bo);
+ cache->map = brw_bo_map(brw, cache->bo, MAP_READ | MAP_WRITE | MAP_ASYNC);
}
static void