From 778c64da97272e7508dbcdf0bffdb699d1b04ce0 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Sun, 21 Feb 2010 11:33:15 +0100 Subject: nv30, nv40: non-trivially unify nv[34]0_state_emit.c The files are the same except for swtnl support on nv40 and for texture cache flushing on nv40. Unify them, and use a macro to define 4 versions of render_states, for all combinations of nvfx and hwtnl/swtnl. --- src/gallium/drivers/nv30/nv30_vbo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/nv30/nv30_vbo.c') diff --git a/src/gallium/drivers/nv30/nv30_vbo.c b/src/gallium/drivers/nv30/nv30_vbo.c index 119fa59890..2b4401e533 100644 --- a/src/gallium/drivers/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nv30/nv30_vbo.c @@ -175,7 +175,7 @@ nv30_draw_arrays(struct pipe_context *pipe, unsigned restart = 0; nv30_vbo_set_idxbuf(nvfx, NULL, 0); - if (FORCE_SWTNL || !nv30_state_validate(nvfx)) { + if (FORCE_SWTNL || !nvfx_state_validate(nvfx)) { /*return nv30_draw_elements_swtnl(pipe, NULL, 0, mode, start, count);*/ return; @@ -184,7 +184,7 @@ nv30_draw_arrays(struct pipe_context *pipe, while (count) { unsigned vc, nr; - nv30_state_emit(nvfx); + nvfx_state_emit(nvfx); vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 256, mode, start, count, &restart); @@ -238,7 +238,7 @@ nv30_draw_elements_u08(struct nvfx_context *nvfx, void *ib, uint8_t *elts = (uint8_t *)ib + start; unsigned vc, push, restart = 0; - nv30_state_emit(nvfx); + nvfx_state_emit(nvfx); vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 2, mode, start, count, &restart); @@ -289,7 +289,7 @@ nv30_draw_elements_u16(struct nvfx_context *nvfx, void *ib, uint16_t *elts = (uint16_t *)ib + start; unsigned vc, push, restart = 0; - nv30_state_emit(nvfx); + nvfx_state_emit(nvfx); vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 2, mode, start, count, &restart); @@ -340,7 +340,7 @@ nv30_draw_elements_u32(struct nvfx_context *nvfx, void *ib, uint32_t *elts = (uint32_t *)ib + start; unsigned vc, push, restart = 0; - nv30_state_emit(nvfx); + nvfx_state_emit(nvfx); vc = nouveau_vbuf_split(AVAIL_RING(chan), 5, 1, mode, start, count, &restart); @@ -416,7 +416,7 @@ nv30_draw_elements_vbo(struct pipe_context *pipe, while (count) { unsigned nr, vc; - nv30_state_emit(nvfx); + nvfx_state_emit(nvfx); vc = nouveau_vbuf_split(AVAIL_RING(chan), 6, 256, mode, start, count, &restart); @@ -465,7 +465,7 @@ nv30_draw_elements(struct pipe_context *pipe, boolean idxbuf; idxbuf = nv30_vbo_set_idxbuf(nvfx, indexBuffer, indexSize); - if (FORCE_SWTNL || !nv30_state_validate(nvfx)) { + if (FORCE_SWTNL || !nvfx_state_validate(nvfx)) { /*return nv30_draw_elements_swtnl(pipe, NULL, 0, mode, start, count);*/ return; -- cgit v1.2.3