summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-22 06:41:15 +0200
committerMarek Olšák <[email protected]>2010-06-22 06:50:23 +0200
commiteb7ef433bbbeabda963e74adf0ef61c47883f292 (patch)
treed3156aef99d24e5d4f287feaba065d4ace8b78d4 /src/gallium/winsys/radeon
parentbd52246248b745fbf95e97ae188779474e212ff6 (diff)
r300g: optimize the immediate mode emission path a bit
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_r300.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c
index 237fdc8bac4..d2d317dc209 100644
--- a/src/gallium/winsys/radeon/drm/radeon_r300.c
+++ b/src/gallium/winsys/radeon/drm/radeon_r300.c
@@ -192,6 +192,17 @@ static unsigned radeon_get_cs_free_dwords(struct r300_winsys_screen *rws)
return cs->ndw - cs->cdw;
}
+static uint32_t *radeon_get_cs_pointer(struct r300_winsys_screen *rws,
+ unsigned count)
+{
+ struct radeon_libdrm_winsys *ws = radeon_winsys_screen(rws);
+ struct radeon_cs *cs = ws->cs;
+ uint32_t *ptr = cs->packets + cs->cdw;
+
+ cs->cdw += count;
+ return ptr;
+}
+
static void radeon_write_cs_dword(struct r300_winsys_screen *rws,
uint32_t dword)
{
@@ -316,6 +327,7 @@ radeon_setup_winsys(int fd, struct radeon_libdrm_winsys* ws)
ws->base.validate = radeon_validate;
ws->base.destroy = radeon_winsys_destroy;
ws->base.get_cs_free_dwords = radeon_get_cs_free_dwords;
+ ws->base.get_cs_pointer = radeon_get_cs_pointer;
ws->base.write_cs_dword = radeon_write_cs_dword;
ws->base.write_cs_table = radeon_write_cs_table;
ws->base.write_cs_reloc = radeon_write_cs_reloc;