From: Eric Anholt Date: Wed, 17 Dec 2014 00:11:27 +0000 (-0800) Subject: vc4: Drop a weird argument in the BOs-from-handles API. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=113044e1b9d8f70a26f826f7c03adcbbc8ecb138;p=mesa.git vc4: Drop a weird argument in the BOs-from-handles API. --- diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index a00ce71049b..df4c2073df4 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -372,12 +372,14 @@ vc4_resource_from_handle(struct pipe_screen *pscreen, return NULL; rsc->tiled = false; - rsc->bo = vc4_screen_bo_from_handle(pscreen, handle, &slice->stride); + rsc->bo = vc4_screen_bo_from_handle(pscreen, handle); if (!rsc->bo) goto fail; #ifdef USE_VC4_SIMULATOR slice->stride = align(prsc->width0 * rsc->cpp, 16); +#else + slice->stride = handle->stride; #endif slice->tiling = VC4_TILING_FORMAT_LINEAR; diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index f42e0228aab..98c51c1ce7a 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -489,8 +489,7 @@ vc4_screen_bo_get_handle(struct pipe_screen *pscreen, struct vc4_bo * vc4_screen_bo_from_handle(struct pipe_screen *pscreen, - struct winsys_handle *whandle, - unsigned *out_stride) + struct winsys_handle *whandle) { struct vc4_screen *screen = vc4_screen(pscreen); struct vc4_bo *bo; @@ -508,7 +507,5 @@ vc4_screen_bo_from_handle(struct pipe_screen *pscreen, return NULL; } - *out_stride = whandle->stride; - return bo; } diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h index 3819bda3c63..4a8b1f4577d 100644 --- a/src/gallium/drivers/vc4/vc4_screen.h +++ b/src/gallium/drivers/vc4/vc4_screen.h @@ -70,8 +70,7 @@ boolean vc4_screen_bo_get_handle(struct pipe_screen *pscreen, struct winsys_handle *whandle); struct vc4_bo * vc4_screen_bo_from_handle(struct pipe_screen *pscreen, - struct winsys_handle *whandle, - unsigned *out_stride); + struct winsys_handle *whandle); extern uint32_t vc4_debug;