diff options
author | Eric Anholt <[email protected]> | 2010-03-02 10:41:08 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-03-03 11:33:37 -0800 |
commit | 55e90e46e0f4f3f8b5da334d84fefb65b9b3d45b (patch) | |
tree | 61f42b7a466bad35b92743abda594da9118ace15 /src/mesa/drivers | |
parent | a3593833dc2c14948c41654ed015c91634a78af3 (diff) |
intel: Use GTT mapping in the blit fallback path in case there's tiling.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_blit.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 196a64a47ab..1d099e7c475 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -122,21 +122,20 @@ intelEmitCopyBlit(struct intel_context *intel, intel_prepare_render(intel); if (pass >= 2) { - dri_bo_map(dst_buffer, GL_TRUE); - dri_bo_map(src_buffer, GL_FALSE); - _mesa_copy_rect((GLubyte *)dst_buffer->virtual + dst_offset, - cpp, - dst_pitch, - dst_x, dst_y, - w, h, - (GLubyte *)src_buffer->virtual + src_offset, - src_pitch, - src_x, src_y); - - dri_bo_unmap(src_buffer); - dri_bo_unmap(dst_buffer); - - return GL_TRUE; + intel_bo_map_gtt_preferred(intel, dst_buffer, GL_TRUE); + intel_bo_map_gtt_preferred(intel, src_buffer, GL_FALSE); + _mesa_copy_rect((GLubyte *)dst_buffer->virtual + dst_offset, + cpp, + dst_pitch, + dst_x, dst_y, + w, h, + (GLubyte *)src_buffer->virtual + src_offset, + src_pitch, + src_x, src_y); + intel_bo_unmap_gtt_preferred(intel, src_buffer); + intel_bo_unmap_gtt_preferred(intel, dst_buffer); + + return GL_TRUE; } intel_batchbuffer_require_space(intel->batch, 8 * 4); |