diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_screen.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_screen.h | 3 |
3 files changed, 5 insertions, 7 deletions
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; |