diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-12-09 13:07:10 -0500 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2010-12-09 16:07:01 -0500 |
commit | 15753cf54d57b1ebb0cd41b7dbb8030d23213891 (patch) | |
tree | fc98d4875b6a006f14d2c36acfc702178131c70c /src/gallium/winsys/r600/drm/r600_drm.c | |
parent | ef534f3838f23d757a40426728789183ed36c3bb (diff) |
r600g: avoid using pb* helper we are loosing previous cpu cycle with it
r600g is up to a point where all small CPU cycle matter and pb* turn
high on profile. It's mostly because pb try to be generic and thus
trigger unecessary check for r600g driver. To avoid having too much
abstraction & too much depth in the call embedded everythings into
r600_bo. Make code simpler & faster. The performance win highly depend
on the CPU & application considered being more important on slower CPU
and marginal/unoticeable on faster one.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_drm.c')
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_drm.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c index 8c847122f8..3cbbf91878 100644 --- a/src/gallium/winsys/r600/drm/r600_drm.c +++ b/src/gallium/winsys/r600/drm/r600_drm.c @@ -30,7 +30,6 @@ #include <sys/ioctl.h> #include "util/u_inlines.h" #include "util/u_debug.h" -#include <pipebuffer/pb_bufmgr.h> #include "r600.h" #include "r600_priv.h" #include "r600_drm_public.h" @@ -230,12 +229,10 @@ static struct radeon *radeon_new(int fd, unsigned device) if (radeon_drm_get_tiling(radeon)) return NULL; } - radeon->kman = radeon_bo_pbmgr_create(radeon); - if (!radeon->kman) - return NULL; - radeon->cman = pb_cache_manager_create(radeon->kman, 1000000); - if (!radeon->cman) + radeon->bomgr = r600_bomgr_create(radeon, 1000000); + if (radeon->bomgr == NULL) { return NULL; + } return radeon; } @@ -252,11 +249,8 @@ struct radeon *radeon_decref(struct radeon *radeon) return NULL; } - if (radeon->cman) - radeon->cman->destroy(radeon->cman); - - if (radeon->kman) - radeon->kman->destroy(radeon->kman); + if (radeon->bomgr) + r600_bomgr_destroy(radeon->bomgr); if (radeon->fd >= 0) drmClose(radeon->fd); |