diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-31 11:50:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-15 21:37:32 +0100 |
commit | c374c94e41d6e7d677334171e3255778d77cbe18 (patch) | |
tree | db45edc9c88579664b30e292f6c52db8b8c4fade /src/i830.h | |
parent | 96aa7a236ac0605324a94f7b7d10413cb219f071 (diff) |
uxa: Reuse in-flight bo
When we need to allocate a new bo for use as a gpu target, first check
if we can reuse a pixmap that has already been relocated into the
aperture as a temporary target, for instance a glyph mask or a clip mask.
Before:
backend test min(s) median(s) stddev.
xlib firefox-planet-gnome 50.568 50.873 0.30%
xcb firefox-planet-gnome 49.686 53.003 3.92%
xlib evolution 40.115 40.131 0.86%
xcb evolution 28.241 28.285 0.18%
After:
backend test min(s) median(s) stddev.
xlib firefox-planet-gnome 47.759 48.233 0.80%
xcb firefox-planet-gnome 48.611 48.657 0.87%
xlib evolution 38.954 38.991 0.05%
xcb evolution 26.561 26.654 0.19%
And even more dramatic improvements when using a font size larger than
the maximum size of the glyph cache:
xcb firefox-36-20090611: 1.79x speedup
xlib firefox-36-20090611: 1.74x speedup
xcb firefox-36-20090609: 1.62x speedup
xlib firefox-36-20090609: 1.59x speedup
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i830.h')
-rw-r--r-- | src/i830.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -136,14 +136,22 @@ list_is_empty(struct list *head) #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) +#define list_foreach(pos, head) \ + for (pos = (head)->next; pos != (head); pos = pos->next) + +#define list_foreach_entry(pos, type, head, member) \ + for (pos = list_entry((head)->next, type, member);\ + &pos->member != (head); \ + pos = list_entry(pos->member.next, type, member)) + struct intel_pixmap { dri_bo *bo; - uint32_t tiling; + uint32_t tiling, stride; uint32_t flush_write_domain; uint32_t flush_read_domains; uint32_t batch_write_domain; uint32_t batch_read_domains; - struct list flush, batch; + struct list flush, batch, in_flight; }; struct intel_pixmap *i830_get_pixmap_intel(PixmapPtr pixmap); @@ -252,6 +260,7 @@ typedef struct intel_screen_private { int batch_atomic_limit; struct list batch_pixmaps; struct list flush_pixmaps; + struct list in_flight; /* For Xvideo */ Bool use_drmmode_overlay; |