diff options
author | Luca Barbieri <[email protected]> | 2010-02-21 11:17:55 +0100 |
---|---|---|
committer | Younes Manton <[email protected]> | 2010-03-15 00:03:03 -0400 |
commit | f9eafeca297497a94c438ea28ed59f3a45ed2566 (patch) | |
tree | 135ad0fbb6f9bd900f3cb9b411024e669d1f87e2 /src/gallium/drivers/nv30 | |
parent | bcb37411fc9159a5c1af50b7defbf1f526b50793 (diff) |
nv30, nv40: non-trivially unify nv[34]0_draw.c
nv30_draw.c is a stub.
This patch makes both nv30 and nv40 use the nv40 swtnl path.
Note that this doesn't actually work on nv30 because the vertex program is
encoded in the nv40-only layout.
However, swtnl was unimplemented before on nv30, so this is not a regression.
Furthermore, a patch to fix this is available near the end of the patchset.
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r-- | src/gallium/drivers/nv30/Makefile | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv30/nv30_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nv30/nv30_context.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nv30/nv30_draw.c | 61 |
4 files changed, 1 insertions, 66 deletions
diff --git a/src/gallium/drivers/nv30/Makefile b/src/gallium/drivers/nv30/Makefile index 196cc9a1ef7..791b0040bb8 100644 --- a/src/gallium/drivers/nv30/Makefile +++ b/src/gallium/drivers/nv30/Makefile @@ -5,7 +5,6 @@ LIBNAME = nv30 C_SOURCES = \ nv30_context.c \ - nv30_draw.c \ nv30_fragtex.c \ nv30_screen.c \ nv30_state.c \ diff --git a/src/gallium/drivers/nv30/nv30_context.c b/src/gallium/drivers/nv30/nv30_context.c index f13458d50a3..671a1939e8d 100644 --- a/src/gallium/drivers/nv30/nv30_context.c +++ b/src/gallium/drivers/nv30/nv30_context.c @@ -84,7 +84,7 @@ nv30_create(struct pipe_screen *pscreen, void *priv) draw_wide_line_threshold(nvfx->draw, 9999999.0); draw_enable_line_stipple(nvfx->draw, FALSE); draw_enable_point_sprites(nvfx->draw, FALSE); - draw_set_rasterize_stage(nvfx->draw, nv30_draw_render_stage(nvfx)); + draw_set_rasterize_stage(nvfx->draw, nvfx_draw_render_stage(nvfx)); return &nvfx->pipe; } diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h index 7840318363a..ebdd5455ca8 100644 --- a/src/gallium/drivers/nv30/nv30_context.h +++ b/src/gallium/drivers/nv30/nv30_context.h @@ -5,9 +5,6 @@ extern void nv30_init_state_functions(struct nvfx_context *nvfx); -/* nv30_draw.c */ -extern struct draw_stage *nv30_draw_render_stage(struct nvfx_context *nvfx); - /* nv30_vertprog.c */ extern void nv30_vertprog_destroy(struct nvfx_context *, struct nvfx_vertex_program *); diff --git a/src/gallium/drivers/nv30/nv30_draw.c b/src/gallium/drivers/nv30/nv30_draw.c deleted file mode 100644 index 5d22e78abf7..00000000000 --- a/src/gallium/drivers/nv30/nv30_draw.c +++ /dev/null @@ -1,61 +0,0 @@ -#include "draw/draw_pipe.h" - -#include "nv30_context.h" - -struct nv30_draw_stage { - struct draw_stage draw; - struct nvfx_context *nvfx; -}; - -static void -nv30_draw_point(struct draw_stage *draw, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv30_draw_line(struct draw_stage *draw, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv30_draw_tri(struct draw_stage *draw, struct prim_header *prim) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv30_draw_flush(struct draw_stage *draw, unsigned flags) -{ -} - -static void -nv30_draw_reset_stipple_counter(struct draw_stage *draw) -{ - NOUVEAU_ERR("\n"); -} - -static void -nv30_draw_destroy(struct draw_stage *draw) -{ - FREE(draw); -} - -struct draw_stage * -nv30_draw_render_stage(struct nvfx_context *nvfx) -{ - struct nv30_draw_stage *nv30draw = CALLOC_STRUCT(nv30_draw_stage); - - nv30draw->nvfx = nvfx; - nv30draw->draw.draw = nvfx->draw; - nv30draw->draw.point = nv30_draw_point; - nv30draw->draw.line = nv30_draw_line; - nv30draw->draw.tri = nv30_draw_tri; - nv30draw->draw.flush = nv30_draw_flush; - nv30draw->draw.reset_stipple_counter = nv30_draw_reset_stipple_counter; - nv30draw->draw.destroy = nv30_draw_destroy; - - return &nv30draw->draw; -} - |