[Mesa-dev] [PATCH 08/19] intel: Use intel_region_map/unmap in intel_renderbuffer_map/unmap
Chad Versace
chad at chad-versace.us
Fri Sep 23 17:37:38 PDT 2011
Before this commit, intel_renderbuffer_map/unmap() directly called
drm_intel_gem_bo_map_gtt(). Since a HiZ or depth resolve may be required
before mapping, though, we need instead need to call
intel_region_map/unmap().
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
src/mesa/drivers/dri/intel/intel_span.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 9760844..058c8ad 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -234,9 +234,8 @@ intel_renderbuffer_map(struct intel_context *intel, struct gl_renderbuffer *rb)
if (!irb->region)
return;
- drm_intel_gem_bo_map_gtt(irb->region->buffer);
-
- rb->Data = irb->region->buffer->virtual;
+ rb->Data = intel_region_map(intel, irb->region,
+ GL_MAP_READ_BIT | GL_MAP_WRITE_BIT);
rb->RowStride = irb->region->pitch;
if (!rb->Name) {
@@ -271,7 +270,7 @@ intel_renderbuffer_unmap(struct intel_context *intel,
if (!irb->region)
return;
- drm_intel_gem_bo_unmap_gtt(irb->region->buffer);
+ intel_region_unmap(intel, irb->region);
rb->GetRow = NULL;
rb->PutRow = NULL;
--
1.7.6.2
More information about the mesa-dev
mailing list