aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_program_cache.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-03-20 16:42:55 -0700
committerKenneth Graunke <[email protected]>2017-04-10 14:31:11 -0700
commiteed86b975e4451c9fa85d7aad9fc747e9b941e2a (patch)
tree610ffdac7730bf977bda762df45420a6a2674fa9 /src/mesa/drivers/dri/i965/brw_program_cache.c
parent91b973e3a3c967490321a809aa49489cabec0192 (diff)
i965/drm: Use our internal libdrm (drm_bacon) rather than the real one.
Now we can actually test our changes. Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_program_cache.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program_cache.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 6bf26f31d35..a6f4bae8c27 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -213,27 +213,27 @@ static void
brw_cache_new_bo(struct brw_cache *cache, uint32_t new_size)
{
struct brw_context *brw = cache->brw;
- drm_intel_bo *new_bo;
+ drm_bacon_bo *new_bo;
- new_bo = drm_intel_bo_alloc(brw->bufmgr, "program cache", new_size, 64);
+ new_bo = drm_bacon_bo_alloc(brw->bufmgr, "program cache", new_size, 64);
if (brw->has_llc)
- drm_intel_gem_bo_map_unsynchronized(new_bo);
+ drm_bacon_gem_bo_map_unsynchronized(new_bo);
/* Copy any existing data that needs to be saved. */
if (cache->next_offset != 0) {
if (brw->has_llc) {
memcpy(new_bo->virtual, cache->bo->virtual, cache->next_offset);
} else {
- drm_intel_bo_map(cache->bo, false);
- drm_intel_bo_subdata(new_bo, 0, cache->next_offset,
+ drm_bacon_bo_map(cache->bo, false);
+ drm_bacon_bo_subdata(new_bo, 0, cache->next_offset,
cache->bo->virtual);
- drm_intel_bo_unmap(cache->bo);
+ drm_bacon_bo_unmap(cache->bo);
}
}
if (brw->has_llc)
- drm_intel_bo_unmap(cache->bo);
- drm_intel_bo_unreference(cache->bo);
+ drm_bacon_bo_unmap(cache->bo);
+ drm_bacon_bo_unreference(cache->bo);
cache->bo = new_bo;
cache->bo_used_by_gpu = false;
@@ -264,10 +264,10 @@ brw_lookup_prog(const struct brw_cache *cache,
continue;
if (!brw->has_llc)
- drm_intel_bo_map(cache->bo, false);
+ drm_bacon_bo_map(cache->bo, false);
ret = memcmp(cache->bo->virtual + item->offset, data, item->size);
if (!brw->has_llc)
- drm_intel_bo_unmap(cache->bo);
+ drm_bacon_bo_unmap(cache->bo);
if (ret)
continue;
@@ -369,7 +369,7 @@ brw_upload_cache(struct brw_cache *cache,
if (brw->has_llc) {
memcpy((char *)cache->bo->virtual + item->offset, data, data_size);
} else {
- drm_intel_bo_subdata(cache->bo, item->offset, data_size, data);
+ drm_bacon_bo_subdata(cache->bo, item->offset, data_size, data);
}
}
@@ -406,9 +406,9 @@ brw_init_caches(struct brw_context *brw)
cache->items =
calloc(cache->size, sizeof(struct brw_cache_item *));
- cache->bo = drm_intel_bo_alloc(brw->bufmgr, "program cache", 4096, 64);
+ cache->bo = drm_bacon_bo_alloc(brw->bufmgr, "program cache", 4096, 64);
if (brw->has_llc)
- drm_intel_gem_bo_map_unsynchronized(cache->bo);
+ drm_bacon_gem_bo_map_unsynchronized(cache->bo);
}
static void
@@ -486,8 +486,8 @@ brw_destroy_cache(struct brw_context *brw, struct brw_cache *cache)
DBG("%s\n", __func__);
if (brw->has_llc)
- drm_intel_bo_unmap(cache->bo);
- drm_intel_bo_unreference(cache->bo);
+ drm_bacon_bo_unmap(cache->bo);
+ drm_bacon_bo_unreference(cache->bo);
cache->bo = NULL;
brw_clear_cache(brw, cache);
free(cache->items);
@@ -536,7 +536,7 @@ brw_print_program_cache(struct brw_context *brw)
struct brw_cache_item *item;
if (!brw->has_llc)
- drm_intel_bo_map(cache->bo, false);
+ drm_bacon_bo_map(cache->bo, false);
for (unsigned i = 0; i < cache->size; i++) {
for (item = cache->items[i]; item; item = item->next) {
@@ -547,5 +547,5 @@ brw_print_program_cache(struct brw_context *brw)
}
if (!brw->has_llc)
- drm_intel_bo_unmap(cache->bo);
+ drm_bacon_bo_unmap(cache->bo);
}