diff options
author | Keith Packard <[email protected]> | 2013-06-03 20:59:31 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-11-07 19:08:09 -0800 |
commit | bf6591e948d95b73c5b8d10fa448ec87e9572b8e (patch) | |
tree | e11e022f27a3c8bd016dd8c377a373818ac9db4f /src/mesa/drivers/dri/i915/intel_screen.c | |
parent | 888533dcd6fe30fc0729ef4ae8fa495c69dcc629 (diff) |
dri/intel: Add explicit size parameter to intel_region_alloc_for_fd
Instead of assuming that the size will be height * pitch, have the caller pass
in the size explicitly.
Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_screen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 7b73b80520c..d46d0eb19cb 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -654,8 +654,8 @@ intel_create_image_from_fds(__DRIscreen *screen, return NULL; image->region = intel_region_alloc_for_fd(intelScreen, - 1, width, height, - strides[0], fds[0], "image"); + f->planes[0].cpp, width, height, strides[0], + height * strides[0], fds[0], "image"); if (image->region == NULL) { free(image); return NULL; |