summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3d_bufmgr.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-11-01 12:15:25 -0700
committerEric Anholt <[email protected]>2018-11-01 13:54:36 -0700
commit47586ab56989bc4225caf173f5bb570f60c7759f (patch)
tree85b432590f8086f1ba8ae3bfe8ab0cd00a859ead /src/gallium/drivers/v3d/v3d_bufmgr.c
parent5313fb8abd2af8f0b5cfb8d3bc1b64697d8176d7 (diff)
v3d: Respect user-passed strides for BO imports.
If the caller has passed in a stride for (linear) BO import, we should use that stride when rendering to the BO (or, if we some day support texturing from linear-imported BOs, when doing the linear-to-UIF shadow copy). This lets us remove the extra stride-changing relayout in the simulator.
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_bufmgr.c')
-rw-r--r--src/gallium/drivers/v3d/v3d_bufmgr.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/v3d/v3d_bufmgr.c b/src/gallium/drivers/v3d/v3d_bufmgr.c
index d01b60e3223..970c38e08fe 100644
--- a/src/gallium/drivers/v3d/v3d_bufmgr.c
+++ b/src/gallium/drivers/v3d/v3d_bufmgr.c
@@ -331,7 +331,6 @@ v3d_bo_last_unreference_locked_timed(struct v3d_bo *bo, time_t time)
static struct v3d_bo *
v3d_bo_open_handle(struct v3d_screen *screen,
- uint32_t winsys_stride,
uint32_t handle, uint32_t size)
{
struct v3d_bo *bo;
@@ -355,8 +354,7 @@ v3d_bo_open_handle(struct v3d_screen *screen,
bo->private = false;
#ifdef USE_V3D_SIMULATOR
- v3d_simulator_open_from_handle(screen->fd, winsys_stride,
- bo->handle, bo->size);
+ v3d_simulator_open_from_handle(screen->fd, bo->handle, bo->size);
bo->map = malloc(bo->size);
#endif
@@ -382,8 +380,7 @@ done:
}
struct v3d_bo *
-v3d_bo_open_name(struct v3d_screen *screen, uint32_t name,
- uint32_t winsys_stride)
+v3d_bo_open_name(struct v3d_screen *screen, uint32_t name)
{
struct drm_gem_open o = {
.name = name
@@ -395,11 +392,11 @@ v3d_bo_open_name(struct v3d_screen *screen, uint32_t name,
return NULL;
}
- return v3d_bo_open_handle(screen, winsys_stride, o.handle, o.size);
+ return v3d_bo_open_handle(screen, o.handle, o.size);
}
struct v3d_bo *
-v3d_bo_open_dmabuf(struct v3d_screen *screen, int fd, uint32_t winsys_stride)
+v3d_bo_open_dmabuf(struct v3d_screen *screen, int fd)
{
uint32_t handle;
int ret = drmPrimeFDToHandle(screen->fd, fd, &handle);
@@ -416,7 +413,7 @@ v3d_bo_open_dmabuf(struct v3d_screen *screen, int fd, uint32_t winsys_stride)
return NULL;
}
- return v3d_bo_open_handle(screen, winsys_stride, handle, size);
+ return v3d_bo_open_handle(screen, handle, size);
}
int