diff options
author | Jakob Bornecrantz <[email protected]> | 2009-11-06 20:44:09 +0000 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-11-06 20:45:40 +0000 |
commit | 1f94c06d3fcf7ff365c3e528179869d702bdd25e (patch) | |
tree | cdf32416659b347eea4a5e7bf143f070344cf3b4 | |
parent | 9708ce874edb140ddffd44ddbb33011273a8ded9 (diff) |
i965g: Fixup buffer creation function
First tri!
-rw-r--r-- | src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c index 725140fbabe..1f3f19ab725 100644 --- a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c +++ b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c @@ -33,14 +33,23 @@ i965_libdrm_bo_alloc(struct brw_winsys_screen *sws, switch (type) { case BRW_BUFFER_TYPE_TEXTURE: - break; +/* case BRW_BUFFER_TYPE_SCANOUT:*/ case BRW_BUFFER_TYPE_VERTEX: - buf->map_gtt = TRUE; + case BRW_BUFFER_TYPE_CURBE: + case BRW_BUFFER_TYPE_QUERY: + case BRW_BUFFER_TYPE_SHADER_CONSTANTS: + case BRW_BUFFER_TYPE_SHADER_SCRATCH: + case BRW_BUFFER_TYPE_BATCH: + case BRW_BUFFER_TYPE_GENERAL_STATE: + case BRW_BUFFER_TYPE_SURFACE_STATE: + case BRW_BUFFER_TYPE_PIXEL: + case BRW_BUFFER_TYPE_GENERIC: break; case BRW_BUFFER_TYPE_SCANOUT: buf->map_gtt = TRUE; break; default: + assert(0); break; } @@ -52,6 +61,7 @@ i965_libdrm_bo_alloc(struct brw_winsys_screen *sws, if (!buf->bo) goto err; + pipe_reference_init(&buf->base.reference, 1); buf->base.size = size; buf->base.sws = sws; |