nv30, nv40: unify identical nv[34]0_clear.c
authorLuca Barbieri <luca@luca-barbieri.com>
Sat, 20 Feb 2010 19:04:54 +0000 (20:04 +0100)
committerYounes Manton <younes.m@gmail.com>
Mon, 15 Mar 2010 04:03:01 +0000 (00:03 -0400)
src/gallium/drivers/nv30/Makefile
src/gallium/drivers/nv30/nv30_clear.c [deleted file]
src/gallium/drivers/nv30/nv30_context.c
src/gallium/drivers/nv30/nv30_context.h
src/gallium/drivers/nv40/Makefile
src/gallium/drivers/nv40/nv40_clear.c [deleted file]
src/gallium/drivers/nv40/nv40_context.c
src/gallium/drivers/nv40/nv40_context.h
src/gallium/drivers/nvfx/Makefile
src/gallium/drivers/nvfx/nvfx_clear.c [new file with mode: 0644]
src/gallium/drivers/nvfx/nvfx_context.h

index ed02075d131b9ac238f91d5e53a3616553a0ee03..27f19da75cc9c2cb95eaac57e86c453e3b89e9af 100644 (file)
@@ -4,7 +4,6 @@ include $(TOP)/configs/current
 LIBNAME = nv30
 
 C_SOURCES = \
-       nv30_clear.c \
        nv30_context.c \
        nv30_draw.c \
        nv30_fragprog.c \
diff --git a/src/gallium/drivers/nv30/nv30_clear.c b/src/gallium/drivers/nv30/nv30_clear.c
deleted file mode 100644 (file)
index e7ba73d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "pipe/p_context.h"
-#include "pipe/p_defines.h"
-#include "pipe/p_state.h"
-#include "util/u_clear.h"
-
-#include "nv30_context.h"
-
-void
-nv30_clear(struct pipe_context *pipe, unsigned buffers,
-           const float *rgba, double depth, unsigned stencil)
-{
-       util_clear(pipe, &nvfx_context(pipe)->framebuffer, buffers, rgba, depth,
-                  stencil);
-}
index afed8bb952affc04a4a7c7cf2c4c5bfd87bbb79d..74be578705c752960e6d1cefdf3f119efe317f7d 100644 (file)
@@ -62,7 +62,7 @@ nv30_create(struct pipe_screen *pscreen, void *priv)
        nvfx->pipe.destroy = nv30_destroy;
        nvfx->pipe.draw_arrays = nv30_draw_arrays;
        nvfx->pipe.draw_elements = nv30_draw_elements;
-       nvfx->pipe.clear = nv30_clear;
+       nvfx->pipe.clear = nvfx_clear;
        nvfx->pipe.flush = nv30_flush;
 
        nvfx->pipe.is_texture_referenced = nouveau_is_texture_referenced;
index 2fc148cdedb6ed3149bf3a75e00fad0f193f5985..8032bcd9797806ac9434300a7b1b7bc4c52cf91e 100644 (file)
@@ -51,10 +51,6 @@ extern void nv30_draw_elements(struct pipe_context *pipe,
                                  unsigned mode, unsigned start,
                                  unsigned count);
 
-/* nv30_clear.c */
-extern void nv30_clear(struct pipe_context *pipe, unsigned buffers,
-                      const float *rgba, double depth, unsigned stencil);
-
 /* nvfx_context.c */
 struct pipe_context *
 nv30_create(struct pipe_screen *pscreen, void *priv);
index 50e5e72b4ea95063953b83bea8a48e2af864be47..031c943de523a5de6cc712290709ed7b8fc52132 100644 (file)
@@ -4,7 +4,6 @@ include $(TOP)/configs/current
 LIBNAME = nv40
 
 C_SOURCES = \
-       nv40_clear.c \
        nv40_context.c \
        nv40_draw.c \
        nv40_fragprog.c \
diff --git a/src/gallium/drivers/nv40/nv40_clear.c b/src/gallium/drivers/nv40/nv40_clear.c
deleted file mode 100644 (file)
index 79de904..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "pipe/p_context.h"
-#include "pipe/p_defines.h"
-#include "pipe/p_state.h"
-#include "util/u_clear.h"
-
-#include "nv40_context.h"
-
-void
-nv40_clear(struct pipe_context *pipe, unsigned buffers,
-           const float *rgba, double depth, unsigned stencil)
-{
-       util_clear(pipe, &nvfx_context(pipe)->framebuffer, buffers, rgba, depth,
-                  stencil);
-}
index 6cc3a339e67d264a09fa517b2b19937578960099..cb249dd5d7626f81be7fb9e52e18abebc0dba207 100644 (file)
@@ -62,7 +62,7 @@ nv40_create(struct pipe_screen *pscreen, void *priv)
        nvfx->pipe.destroy = nv40_destroy;
        nvfx->pipe.draw_arrays = nv40_draw_arrays;
        nvfx->pipe.draw_elements = nv40_draw_elements;
-       nvfx->pipe.clear = nv40_clear;
+       nvfx->pipe.clear = nvfx_clear;
        nvfx->pipe.flush = nv40_flush;
 
        nvfx->pipe.is_texture_referenced = nouveau_is_texture_referenced;
index 7227c4a438bc670d5ab5da80406a6a6569d4007e..f9c0a9eb29ebe7b87c7d06aac81fa3105e45a3ab 100644 (file)
@@ -57,10 +57,6 @@ extern void nv40_draw_elements(struct pipe_context *pipe,
                                  unsigned mode, unsigned start,
                                  unsigned count);
 
-/* nv40_clear.c */
-extern void nv40_clear(struct pipe_context *pipe, unsigned buffers,
-                      const float *rgba, double depth, unsigned stencil);
-
 /* nvfx_context.c */
 struct pipe_context *
 nv40_create(struct pipe_screen *pscreen, void *priv);
index 05cdda0cc02ce95f747b0b7b10736e6267db2d20..6959efa390fd265d975fc1d2e7b0c1a90ceba405 100644 (file)
@@ -3,9 +3,7 @@ include $(TOP)/configs/current
 
 LIBNAME = nvfx
 
-nvfx_dummy.c:
-       touch nvfx_dummy.c
-
-C_SOURCES = nvfx_dummy.c
+C_SOURCES = \
+       nvfx_clear.c
 
 include ../../Makefile.template
diff --git a/src/gallium/drivers/nvfx/nvfx_clear.c b/src/gallium/drivers/nvfx/nvfx_clear.c
new file mode 100644 (file)
index 0000000..2be70fc
--- /dev/null
@@ -0,0 +1,14 @@
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_state.h"
+#include "util/u_clear.h"
+
+#include "nvfx_context.h"
+
+void
+nvfx_clear(struct pipe_context *pipe, unsigned buffers,
+           const float *rgba, double depth, unsigned stencil)
+{
+       util_clear(pipe, &nvfx_context(pipe)->framebuffer, buffers, rgba, depth,
+                  stencil);
+}
index 87bad54e630ae3ccf16497a9c0f4e387b552f864..0aaa4964e2b1eff289acfc85179c7a2e46f50653 100644 (file)
@@ -181,4 +181,8 @@ struct nvfx_state_entry {
        } dirty;
 };
 
+/* nvfx_clear.c */
+extern void nvfx_clear(struct pipe_context *pipe, unsigned buffers,
+                      const float *rgba, double depth, unsigned stencil);
+
 #endif