diff options
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_regions.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_regions.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c index ec85c4131a..749920502a 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.c +++ b/src/mesa/drivers/dri/intel/intel_regions.c @@ -109,12 +109,18 @@ intel_region_alloc_internal(struct intel_context *intel, struct intel_region * intel_region_alloc(struct intel_context *intel, - GLuint cpp, GLuint width, GLuint height, GLuint pitch) + GLuint cpp, GLuint width, GLuint height, GLuint pitch, + GLboolean expect_accelerated_upload) { dri_bo *buffer; - buffer = dri_bo_alloc(intel->bufmgr, "region", - pitch * cpp * height, 64); + if (expect_accelerated_upload) { + buffer = drm_intel_bo_alloc_for_render(intel->bufmgr, "region", + pitch * cpp * height, 64); + } else { + buffer = drm_intel_bo_alloc(intel->bufmgr, "region", + pitch * cpp * height, 64); + } return intel_region_alloc_internal(intel, cpp, width, height, pitch, buffer); } |