Mesa (master): freedreno: honor handle->offset
Rob Clark
robclark at kemper.freedesktop.org
Mon Apr 25 20:29:11 UTC 2016
Module: Mesa
Branch: master
Commit: 2c8674f5a90f236b9e07b759d49911d79921bc78
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c8674f5a90f236b9e07b759d49911d79921bc78
Author: Rob Clark <robclark at freedesktop.org>
Date: Mon Apr 25 11:47:21 2016 -0400
freedreno: honor handle->offset
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/gallium/drivers/freedreno/freedreno_resource.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 9aded3b..99affc4 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -43,6 +43,8 @@
#include <errno.h>
+/* XXX this should go away, needed for 'struct winsys_handle' */
+#include "state_tracker/drm_driver.h"
static bool
pending(struct fd_resource *rsc, enum fd_resource_status status)
@@ -637,8 +639,7 @@ fail:
static struct pipe_resource *
fd_resource_from_handle(struct pipe_screen *pscreen,
const struct pipe_resource *tmpl,
- struct winsys_handle *handle,
- unsigned usage)
+ struct winsys_handle *handle, unsigned usage)
{
struct fd_resource *rsc = CALLOC_STRUCT(fd_resource);
struct fd_resource_slice *slice = &rsc->slices[0];
@@ -669,6 +670,7 @@ fd_resource_from_handle(struct pipe_screen *pscreen,
rsc->base.vtbl = &fd_resource_vtbl;
rsc->cpp = util_format_get_blocksize(tmpl->format);
slice->pitch /= rsc->cpp;
+ slice->offset = handle->offset;
assert(rsc->cpp);
More information about the mesa-commit
mailing list