[Mesa-dev] [PATCH 09/13] i915g: switch to tiled allocations, kill set_fence

Jakob Bornecrantz wallbraker at gmail.com
Sat Nov 20 13:36:46 PST 2010


On Fri, Nov 19, 2010 at 11:38 PM, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> This way relaxed fencing is handled by libdrm. And buffers _can't_
> ever change their tiling.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Except for a nitpick Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com>

> ---
>  src/gallium/drivers/i915/i915_resource_texture.c |   16 ++--------------
>  src/gallium/drivers/i915/i915_winsys.h           |    9 ---------
>  src/gallium/winsys/i915/drm/i915_drm_buffer.c    |   19 -------------------
>  src/gallium/winsys/i915/sw/i915_sw_buffer.c      |   18 ------------------
>  src/gallium/winsys/i915/sw/i915_sw_winsys.h      |    1 -
>  5 files changed, 2 insertions(+), 61 deletions(-)
>
> diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
> index b4c0843..f563d06 100644
> --- a/src/gallium/drivers/i915/i915_resource_texture.c
> +++ b/src/gallium/drivers/i915/i915_resource_texture.c
> @@ -785,23 +785,11 @@ i915_texture_create(struct pipe_screen *screen,
>    else
>       buf_usage = I915_NEW_TEXTURE;
>
> -   tex->buffer = iws->buffer_create(iws, tex_size);
> +   tex->buffer = iws->buffer_create_tiled(iws, tex->stride, tex->total_nblocksy,
> +                                         &tex->tiling, &tex->stride);
>    if (!tex->buffer)
>       goto fail;
>
> -   /* setup any hw fences */
> -   if (tex->tiling) {
> -      iws->buffer_set_fence_reg(iws, tex->buffer, tex->stride, tex->tiling);
> -   }
> -
> -
> -#if 0
> -   void *ptr = ws->buffer_map(ws, tex->buffer,
> -      PIPE_BUFFER_USAGE_CPU_WRITE);
> -   memset(ptr, 0x80, tex_size);
> -   ws->buffer_unmap(ws, tex->buffer);
> -#endif
> -

This chunk is a unrelated change. Tho I don't mind seeing it burn in a fire.

Cheers Jakob.


More information about the mesa-dev mailing list