diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-07-23 07:14:07 -0700 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-07-23 07:18:29 -0700 |
commit | ca83d5a8db510756eb95423a52b19ff52a2d6dc1 (patch) | |
tree | 7eead4cb2ee76c5da7d56693d4a9c8d7cabf1e14 /src/gallium/winsys/drm/radeon/core/radeon_r300.c | |
parent | 27b3c435ba0b9da6ab25cbffac9f975e0adaa66e (diff) |
r300g, radeon-gallium: Fix API, cleanup.
Something called "validate" should return FALSE on failure, not TRUE.
Diffstat (limited to 'src/gallium/winsys/drm/radeon/core/radeon_r300.c')
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_r300.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c index ac33ea4c6e..e927409e3a 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c @@ -41,11 +41,11 @@ static boolean radeon_r300_validate(struct r300_winsys* winsys) (struct radeon_winsys_priv*)winsys->radeon_winsys; if (radeon_cs_space_check(priv->cs) < 0) { - return TRUE; + return FALSE; } /* Things are fine, we can proceed as normal. */ - return FALSE; + return TRUE; } static boolean radeon_r300_check_cs(struct r300_winsys* winsys, int size) @@ -118,10 +118,15 @@ static void radeon_r300_flush_cs(struct r300_winsys* winsys) debug_printf("radeon: Bad CS, dumping...\n"); radeon_cs_print(priv->cs, stderr); } - radeon_cs_erase(priv->cs); /* Clean out BOs. */ radeon_cs_space_reset_bos(priv->cs); + + /* Reset CS. + * Someday, when we care about performance, we should really find a way + * to rotate between two or three CS objects so that the GPU can be + * spinning through one CS while another one is being filled. */ + radeon_cs_erase(priv->cs); } /* Helper function to do the ioctls needed for setup and init. */ |