i915g: drop alignment parameter from iws->buffer_create
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 21 Nov 2010 18:06:48 +0000 (19:06 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Thu, 2 Dec 2010 00:34:12 +0000 (01:34 +0100)
It's unnecessary. The kernel gem ignores it totally and we can't
run on the old userspace fake bo manager due to lack of dri2.

Also drop the redundant name string from the sw winsys as suggested
by Jakob Bornecrantz

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
src/gallium/drivers/i915/i915_prim_vbuf.c
src/gallium/drivers/i915/i915_resource_texture.c
src/gallium/drivers/i915/i915_winsys.h
src/gallium/winsys/i915/drm/i915_drm_buffer.c
src/gallium/winsys/i915/sw/i915_sw_buffer.c
src/gallium/winsys/i915/sw/i915_sw_winsys.h

index bd046bd9058463ecb1d9a6356aeff344cebf0c82..d760b2c4da32cb3eebe6817684f1d9abfa9e68f7 100644 (file)
@@ -198,7 +198,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
 #endif
 
    i915_render->vbo = iws->buffer_create(iws, i915_render->vbo_size,
-                                         64, I915_NEW_VERTEX);
+                                         I915_NEW_VERTEX);
 }
 
 /**
@@ -726,7 +726,7 @@ i915_vbuf_render_create(struct i915_context *i915)
    i915_render->pool_fifo = u_fifo_create(6);
    for (i = 0; i < 6; i++)
       u_fifo_add(i915_render->pool_fifo,
-                 iws->buffer_create(iws, i915_render->pool_buffer_size, 64,
+                 iws->buffer_create(iws, i915_render->pool_buffer_size,
                                     I915_NEW_VERTEX));
 #else
    (void)i;
index d45346b32ada1433e1c1dd777988a4a78c6796d7..301d0fe49751276630e87f5c78e82150a7a907c1 100644 (file)
@@ -785,7 +785,7 @@ i915_texture_create(struct pipe_screen *screen,
    else
       buf_usage = I915_NEW_TEXTURE;
 
-   tex->buffer = iws->buffer_create(iws, tex_size, 64, buf_usage);
+   tex->buffer = iws->buffer_create(iws, tex_size, buf_usage);
    if (!tex->buffer)
       goto fail;
 
index 5385e403d224e3715dd8116b2f0e92f049961c8f..3d5627045bcf323f5e6ca51866eb5a62a65eb905 100644 (file)
@@ -130,7 +130,7 @@ struct i915_winsys {
     */
    struct i915_winsys_buffer *
       (*buffer_create)(struct i915_winsys *iws,
-                       unsigned size, unsigned alignment,
+                       unsigned size,
                        enum i915_winsys_buffer_type type);
 
    /**
index 15ec4487457795a72c1ee11ac430c9979fe934c2..ab1e12529e48153431f7fef036aa1246c895277f 100644 (file)
@@ -7,7 +7,7 @@
 
 static struct i915_winsys_buffer *
 i915_drm_buffer_create(struct i915_winsys *iws,
-                        unsigned size, unsigned alignment,
+                        unsigned size,
                         enum i915_winsys_buffer_type type)
 {
    struct i915_drm_buffer *buf = CALLOC_STRUCT(i915_drm_buffer);
@@ -32,7 +32,7 @@ i915_drm_buffer_create(struct i915_winsys *iws,
       name = "gallium3d_unknown";
    }
 
-   buf->bo = drm_intel_bo_alloc(idws->gem_manager, name, size, alignment);
+   buf->bo = drm_intel_bo_alloc(idws->gem_manager, name, size, 0);
 
    if (!buf->bo)
       goto err;
index df175688861579fd04a74ff36f24096a4131ecb9..321ef90d265a55f7ba41d44f6b3b70c4570a21f2 100644 (file)
@@ -4,28 +4,15 @@
 
 static struct i915_winsys_buffer *
 i915_sw_buffer_create(struct i915_winsys *iws,
-                      unsigned size, unsigned alignment,
+                      unsigned size,
                       enum i915_winsys_buffer_type type)
 {
    struct i915_sw_buffer *buf = CALLOC_STRUCT(i915_sw_buffer);
-   char *name;
 
    if (!buf)
       return NULL;
 
-   if (type == I915_NEW_TEXTURE) {
-      name = "gallium3d_texture";
-   } else if (type == I915_NEW_VERTEX) {
-      name = "gallium3d_vertex";
-   } else if (type == I915_NEW_SCANOUT) {
-      name = "gallium3d_scanout";
-   } else {
-      assert(0);
-      name = "gallium3d_unknown";
-   }
-
    buf->magic = 0xDEAD1337;
-   buf->name = name;
    buf->type = type;
    buf->ptr = CALLOC(size, 1);
 
index b7b43669f30674a5b4dfe8ba2c53c3f38d2af9d6..cd2eebd17995b4bb35c8139879db81065ce1e299 100644 (file)
@@ -44,7 +44,6 @@ struct i915_sw_buffer {
    unsigned map_count;
    enum i915_winsys_buffer_type type;
    enum i915_winsys_buffer_tile tile;
-   const char *name;
 };
 
 static INLINE struct i915_sw_buffer *