diff options
author | Marek Olšák <[email protected]> | 2010-05-26 19:29:58 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-05-26 22:22:52 +0200 |
commit | a81730cb3205330b5fa1c5a80dc9f0c6dad6cb04 (patch) | |
tree | 265dc47c203db2e831e91c8d725d10b708a4f6be /src/gallium/winsys/radeon | |
parent | 6ca3f86bdcadf850d7c8459c3674b6278a1fecea (diff) |
r300g: add get_cs_info winsys entrypoint, abandon check_cs
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_r300.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index e188f7e7ccd..ecee1ee73db 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -183,12 +183,15 @@ static boolean radeon_validate(struct r300_winsys_screen *rws) return TRUE; } -static boolean radeon_check_cs(struct r300_winsys_screen *rws, int size) +static void radeon_get_cs_info(struct r300_winsys_screen *rws, + struct r300_cs_info *info) { struct radeon_libdrm_winsys *ws = radeon_winsys_screen(rws); struct radeon_cs *cs = ws->cs; - return cs->cdw + size <= cs->ndw; + info->capacity = cs->ndw; + info->used = cs->cdw; + info->free = cs->ndw - cs->cdw; } static void radeon_begin_cs(struct r300_winsys_screen *rws, @@ -333,7 +336,7 @@ radeon_setup_winsys(int fd, struct radeon_libdrm_winsys* ws) ws->base.add_buffer = radeon_add_buffer; ws->base.validate = radeon_validate; ws->base.destroy = radeon_winsys_destroy; - ws->base.check_cs = radeon_check_cs; + ws->base.get_cs_info = radeon_get_cs_info; ws->base.begin_cs = radeon_begin_cs; ws->base.write_cs_dword = radeon_write_cs_dword; ws->base.write_cs_table = radeon_write_cs_table; |