intel: Make use of the new GPU-unsynchronized map functionality in libdrm.

Improves Unigine Tropics performance at 1024x768 by 2.06236% +/-
0.50272% (n=11).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2012-02-24 15:54:32 -08:00
parent 8308869311
commit 9bd38f3c67
1 changed files with 3 additions and 1 deletions

View File

@ -367,7 +367,9 @@ intel_bufferobj_map_range(struct gl_context * ctx,
return obj->Pointer;
}
if (!(access & GL_MAP_READ_BIT)) {
if (access & GL_MAP_UNSYNCHRONIZED_BIT)
drm_intel_gem_bo_map_unsynchronized(intel_obj->buffer);
else if (!(access & GL_MAP_READ_BIT)) {
drm_intel_gem_bo_map_gtt(intel_obj->buffer);
} else {
drm_intel_bo_map(intel_obj->buffer, (access & GL_MAP_WRITE_BIT) != 0);