diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-05-01 05:54:53 -0700 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-05-01 05:54:53 -0700 |
commit | c11ad489e7432f3ed2fcaf5b15b8fe3538ae6d30 (patch) | |
tree | e2a1bb1fec400d7419a12f0f2532585ae8d61e86 /src/gallium/winsys/drm/radeon/core/radeon_buffer.c | |
parent | d7f4ac9f34a72efe53a1a140557f1822afbadf16 (diff) |
r300-gallium, radeon-winsys: Space accounting.
It is no longer optional in current libdrm, so it was time to actually
start counting our BOs.
Diffstat (limited to 'src/gallium/winsys/drm/radeon/core/radeon_buffer.c')
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_buffer.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c index 611ee68da6..6313eb219e 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c @@ -68,8 +68,8 @@ static struct pipe_buffer *radeon_buffer_create(struct pipe_winsys *ws, domain |= RADEON_GEM_DOMAIN_GTT; } - radeon_buffer->bo = radeon_bo_open(radeon_ws->bom, 0, size, alignment, - domain, 0); + radeon_buffer->bo = radeon_bo_open(radeon_ws->priv->bom, 0, size, + alignment, domain, 0); if (radeon_buffer->bo == NULL) { FREE(radeon_buffer); } @@ -169,8 +169,14 @@ struct radeon_winsys* radeon_pipe_winsys(int fd) return NULL; } + radeon_ws->priv = CALLOC_STRUCT(radeon_winsys_priv); + if (radeon_ws->priv == NULL) { + FREE(radeon_ws); + return NULL; + } + bom = radeon_bo_manager_gem_ctor(fd); - radeon_ws->bom = bom; + radeon_ws->priv->bom = bom; radeon_ws->base.flush_frontbuffer = radeon_flush_frontbuffer; |