diff options
author | Marek Olšák <[email protected]> | 2011-09-27 04:03:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-29 01:10:18 +0200 |
commit | a3cd2c6c9b3724dbc3aa565dab98968c46bde963 (patch) | |
tree | 4edeebe5ffdbddc811fc3064334e031e1360c613 | |
parent | 798ebc91ebe383a702faf597ffbf2033dc467f50 (diff) |
winsys/radeon: remove redundant member radeon_bo::size
It's part of pb_buffer already.
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 8 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.h | 1 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index a3cf319a90d..6a8dabf1c24 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -160,7 +160,7 @@ static void radeon_bo_destroy(struct pb_buffer *_buf) } if (bo->ptr) - os_munmap(bo->ptr, bo->size); + os_munmap(bo->ptr, bo->base.size); /* Close object. */ args.handle = bo->handle; @@ -267,7 +267,7 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf, } args.handle = bo->handle; args.offset = 0; - args.size = (uint64_t)bo->size; + args.size = (uint64_t)bo->base.size; if (drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_MMAP, &args, @@ -361,7 +361,6 @@ static struct pb_buffer *radeon_bomgr_create_bo(struct pb_manager *_mgr, bo->mgr = mgr; bo->rws = mgr->rws; bo->handle = args.handle; - bo->size = size; pipe_mutex_init(bo->map_mutex); return &bo->base; @@ -573,14 +572,13 @@ static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws, goto fail; } bo->handle = open_arg.handle; - bo->size = open_arg.size; bo->name = whandle->handle; /* Initialize it. */ pipe_reference_init(&bo->base.reference, 1); bo->base.alignment = 0; bo->base.usage = PB_USAGE_GPU_WRITE | PB_USAGE_GPU_READ; - bo->base.size = bo->size; + bo->base.size = open_arg.size; bo->base.vtbl = &radeon_bo_vtbl; bo->mgr = mgr; bo->rws = mgr->rws; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h index 3f5866f82db..95a96ad0374 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h @@ -52,7 +52,6 @@ struct radeon_bo { void *ptr; pipe_mutex map_mutex; - uint32_t size; uint32_t handle; uint32_t name; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 5e9851f80f1..a3d0be5c1f3 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -296,9 +296,9 @@ static unsigned radeon_drm_cs_add_reloc(struct radeon_winsys_cs *rcs, unsigned index = radeon_add_reloc(cs->csc, bo, rd, wd, &added_domains); if (added_domains & RADEON_DOMAIN_GTT) - cs->csc->used_gart += bo->size; + cs->csc->used_gart += bo->base.size; if (added_domains & RADEON_DOMAIN_VRAM) - cs->csc->used_vram += bo->size; + cs->csc->used_vram += bo->base.size; return index; } |