vc4: Drop a weird argument in the BOs-from-handles API.
authorEric Anholt <eric@anholt.net>
Wed, 17 Dec 2014 00:11:27 +0000 (16:11 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 18 Dec 2014 00:06:17 +0000 (16:06 -0800)
src/gallium/drivers/vc4/vc4_resource.c
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/vc4/vc4_screen.h

index a00ce71049b8ee1cb10ca6479f99d6fad9489f31..df4c2073df4baecdac93d148d1850465db890f03 100644 (file)
@@ -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;
 
index f42e0228aab091104741062d28a086660d14a479..98c51c1ce7a90d31e38e15f81b17e6113b46f63b 100644 (file)
@@ -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;
 }
index 3819bda3c63c88ccc6146c9f4b63b645b0fbdfc8..4a8b1f4577d6cdf31f55c6a95fe1b90175bd6200 100644 (file)
@@ -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;