diff options
author | Daniel Vetter <[email protected]> | 2010-11-21 20:25:33 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-12-02 01:34:13 +0100 |
commit | 2ff0879a6365e7f7d7e5277274bc965ad57a82b4 (patch) | |
tree | b702ac199b53ea193b3a6e4fa249ed8b5d7ce118 /src/gallium/drivers/i915 | |
parent | 135b083461f8a5a220d86f57af018f6f0316d2bb (diff) |
i915g: return tiling in iws->buffer_from_handle
This is needed to properly implement tiling flags. And the gem
implemention fo buffer_from_handle already calls get_tiling, so
it's for free.
Signed-off-by: Daniel Vetter <[email protected]>
Reviewed-by: Jakob Bornecrantz <[email protected]>
Signed-off-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_resource_texture.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_winsys.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c index ce95e263813..ae34477ec27 100644 --- a/src/gallium/drivers/i915/i915_resource_texture.c +++ b/src/gallium/drivers/i915/i915_resource_texture.c @@ -812,10 +812,11 @@ i915_texture_from_handle(struct pipe_screen * screen, struct i915_winsys *iws = is->iws; struct i915_winsys_buffer *buffer; unsigned stride; + enum i915_winsys_buffer_tile tiling; assert(screen); - buffer = iws->buffer_from_handle(iws, whandle, &stride); + buffer = iws->buffer_from_handle(iws, whandle, &tiling, &stride); /* Only supports one type */ if ((template->target != PIPE_TEXTURE_2D && @@ -835,6 +836,7 @@ i915_texture_from_handle(struct pipe_screen * screen, tex->b.b.screen = screen; tex->stride = stride; + tex->tiling = tiling; tex->total_nblocksy = align_nblocksy(tex->b.b.format, tex->b.b.height0, 8); i915_texture_set_level_info(tex, 0, 1); diff --git a/src/gallium/drivers/i915/i915_winsys.h b/src/gallium/drivers/i915/i915_winsys.h index ddf8a906348..24ea416f015 100644 --- a/src/gallium/drivers/i915/i915_winsys.h +++ b/src/gallium/drivers/i915/i915_winsys.h @@ -53,6 +53,7 @@ enum i915_winsys_buffer_type I915_NEW_VERTEX }; +/* These need to be in sync with the definitions of libdrm-intel! */ enum i915_winsys_buffer_tile { I915_TILE_NONE, @@ -156,6 +157,7 @@ struct i915_winsys { struct i915_winsys_buffer * (*buffer_from_handle)(struct i915_winsys *iws, struct winsys_handle *whandle, + enum i915_winsys_buffer_tile *tiling, unsigned *stride); /** |