[Mesa-dev] [PATCH 4/5] freedreno: support resource_from_handle with non-zero offset
Rob Clark
robdclark at gmail.com
Sun Sep 21 10:46:29 PDT 2014
From: Rob Clark <robclark at freedesktop.org>
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/gallium/drivers/freedreno/freedreno_resource.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 9fe9cc5..16810d9 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -323,9 +323,6 @@ fd_resource_from_handle(struct pipe_screen *pscreen,
if (!rsc)
return NULL;
- if (handle->offset != 0)
- return NULL;
-
*prsc = *tmpl;
pipe_reference_init(&prsc->reference, 1);
@@ -338,6 +335,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);
--
1.9.3
More information about the mesa-dev
mailing list