diff options
Diffstat (limited to 'src/radeon_vbo.h')
-rw-r--r-- | src/radeon_vbo.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/radeon_vbo.h b/src/radeon_vbo.h index a8c70b30..b505f66b 100644 --- a/src/radeon_vbo.h +++ b/src/radeon_vbo.h @@ -2,7 +2,7 @@ #ifndef RADEON_VBO_H #define RADEON_VBO_H -extern void r600_vb_no_space(ScrnInfoPtr pScrn, int vert_size); +extern void radeon_vb_no_space(ScrnInfoPtr pScrn, int vert_size); extern void radeon_vbo_init_lists(ScrnInfoPtr pScrn); extern void radeon_vbo_free_lists(ScrnInfoPtr pScrn); extern void radeon_vbo_flush_bos(ScrnInfoPtr pScrn); @@ -14,8 +14,8 @@ static inline void radeon_vbo_check(ScrnInfoPtr pScrn, int vert_size) RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; - if ((accel_state->vb_offset + (3 * vert_size)) > accel_state->vb_total) { - r600_vb_no_space(pScrn, vert_size); + if ((accel_state->vb_offset + (accel_state->verts_per_op * vert_size)) > accel_state->vb_total) { + radeon_vb_no_space(pScrn, vert_size); } } @@ -28,9 +28,8 @@ radeon_vbo_space(ScrnInfoPtr pScrn, int vert_size) /* we've ran out of space in the vertex buffer - need to get a new one */ - if ((accel_state->vb_offset + (3 * vert_size)) > accel_state->vb_total) { - r600_vb_no_space(pScrn, vert_size); - } + radeon_vbo_check(pScrn, vert_size); + accel_state->vb_op_vert_size = vert_size; #if defined(XF86DRM_MODE) if (info->cs) { @@ -56,7 +55,7 @@ static inline void radeon_vbo_commit(ScrnInfoPtr pScrn) RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; - accel_state->vb_offset += 3 * accel_state->vb_op_vert_size; + accel_state->vb_offset += accel_state->verts_per_op * accel_state->vb_op_vert_size; } #endif |