From 42d9f2bb7bc21ff8c1a3fc4b4ceb4d294bccaabe Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Thu, 15 Apr 2010 06:57:20 +0200 Subject: nouveau: replace vtxbuf/idxbuf caps with BO_ flags in nouveau_screen and fix uncached reads on nv3x Faster, simpler and more flexible. Also, we set those flags properly on nv3x so that we don't allocate buffers in GART. Since on AGP GART is uncached, OpenGL doesn't distinguish between vertex and index buffers, and we don't support hardware index buffers for now, this caused uncached reads. Also check bind and not usage for PIPE_BIND_* flags, got broken in the gallium-resources transition. --- src/gallium/drivers/nv50/nv50_screen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index 425786f00f..7a831143f0 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -134,10 +134,6 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param) return 1; case PIPE_CAP_BLEND_EQUATION_SEPARATE: return 1; - case NOUVEAU_CAP_HW_VTXBUF: - return screen->force_push ? 0 : 1; - case NOUVEAU_CAP_HW_IDXBUF: - return screen->force_push ? 0 : 1; case PIPE_CAP_INDEP_BLEND_ENABLE: return 1; case PIPE_CAP_INDEP_BLEND_FUNC: @@ -501,6 +497,8 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) FIRE_RING (chan); screen->force_push = debug_get_bool_option("NV50_ALWAYS_PUSH", FALSE); + if(!screen->force_push) + screen->base.vertex_buffer_flags = screen->base.index_buffer_flags = NOUVEAU_BO_GART; return pscreen; } -- cgit v1.2.3