summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-02-20 23:16:01 +0100
committerYounes Manton <younes.m@gmail.com>2010-03-15 00:03:01 -0400
commitada801222b3c984c260165415864a8f511145251 (patch)
treef51e6e4e75c9fe387e1d6a777e7d74aa0f5df1a7 /src/gallium/drivers
parent0b55e1cd17801a03d6fbb7ce46f25aa2b086bff4 (diff)
nv30, nv40: unify identical nv[34]0_state_rasterizer.c
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv30/Makefile1
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h1
-rw-r--r--src/gallium/drivers/nv30/nv30_state_rasterizer.c17
-rw-r--r--src/gallium/drivers/nv40/Makefile1
-rw-r--r--src/gallium/drivers/nv40/nv40_context.h1
-rw-r--r--src/gallium/drivers/nv40/nv40_state_rasterizer.c17
-rw-r--r--src/gallium/drivers/nvfx/Makefile1
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.h1
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state_emit.c2
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state_rasterizer.c17
10 files changed, 20 insertions, 39 deletions
diff --git a/src/gallium/drivers/nv30/Makefile b/src/gallium/drivers/nv30/Makefile
index 66dad8f358..668f5965b1 100644
--- a/src/gallium/drivers/nv30/Makefile
+++ b/src/gallium/drivers/nv30/Makefile
@@ -13,7 +13,6 @@ C_SOURCES = \
nv30_screen.c \
nv30_state.c \
nv30_state_fb.c \
- nv30_state_rasterizer.c \
nv30_state_scissor.c \
nv30_state_stipple.c \
nv30_state_viewport.c \
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index e6194b23f5..fbafbec383 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -24,7 +24,6 @@ extern void nv30_fragprog_destroy(struct nvfx_context *,
extern void nv30_fragtex_bind(struct nvfx_context *);
/* nv30_state.c and friends */
-extern struct nvfx_state_entry nv30_state_rasterizer;
extern struct nvfx_state_entry nv30_state_scissor;
extern struct nvfx_state_entry nv30_state_stipple;
extern struct nvfx_state_entry nv30_state_fragprog;
diff --git a/src/gallium/drivers/nv30/nv30_state_rasterizer.c b/src/gallium/drivers/nv30/nv30_state_rasterizer.c
deleted file mode 100644
index 1a83da5204..0000000000
--- a/src/gallium/drivers/nv30/nv30_state_rasterizer.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "nv30_context.h"
-
-static boolean
-nv30_state_rasterizer_validate(struct nvfx_context *nvfx)
-{
- so_ref(nvfx->rasterizer->so,
- &nvfx->state.hw[NVFX_STATE_RAST]);
- return TRUE;
-}
-
-struct nvfx_state_entry nv30_state_rasterizer = {
- .validate = nv30_state_rasterizer_validate,
- .dirty = {
- .pipe = NVFX_NEW_RAST,
- .hw = NVFX_STATE_RAST
- }
-};
diff --git a/src/gallium/drivers/nv40/Makefile b/src/gallium/drivers/nv40/Makefile
index 739ca43387..25ad2974bf 100644
--- a/src/gallium/drivers/nv40/Makefile
+++ b/src/gallium/drivers/nv40/Makefile
@@ -13,7 +13,6 @@ C_SOURCES = \
nv40_screen.c \
nv40_state.c \
nv40_state_fb.c \
- nv40_state_rasterizer.c \
nv40_state_scissor.c \
nv40_state_stipple.c \
nv40_state_viewport.c \
diff --git a/src/gallium/drivers/nv40/nv40_context.h b/src/gallium/drivers/nv40/nv40_context.h
index 28a79e4ecf..fc8b06bd0f 100644
--- a/src/gallium/drivers/nv40/nv40_context.h
+++ b/src/gallium/drivers/nv40/nv40_context.h
@@ -28,7 +28,6 @@ extern void nv40_fragprog_destroy(struct nvfx_context *,
extern void nv40_fragtex_bind(struct nvfx_context *);
/* nv40_state.c and friends */
-extern struct nvfx_state_entry nv40_state_rasterizer;
extern struct nvfx_state_entry nv40_state_scissor;
extern struct nvfx_state_entry nv40_state_stipple;
extern struct nvfx_state_entry nv40_state_fragprog;
diff --git a/src/gallium/drivers/nv40/nv40_state_rasterizer.c b/src/gallium/drivers/nv40/nv40_state_rasterizer.c
deleted file mode 100644
index d6136a26eb..0000000000
--- a/src/gallium/drivers/nv40/nv40_state_rasterizer.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "nv40_context.h"
-
-static boolean
-nv40_state_rasterizer_validate(struct nvfx_context *nvfx)
-{
- so_ref(nvfx->rasterizer->so,
- &nvfx->state.hw[NVFX_STATE_RAST]);
- return TRUE;
-}
-
-struct nvfx_state_entry nv40_state_rasterizer = {
- .validate = nv40_state_rasterizer_validate,
- .dirty = {
- .pipe = NVFX_NEW_RAST,
- .hw = NVFX_STATE_RAST
- }
-};
diff --git a/src/gallium/drivers/nvfx/Makefile b/src/gallium/drivers/nvfx/Makefile
index d124de89ec..f1843b61df 100644
--- a/src/gallium/drivers/nvfx/Makefile
+++ b/src/gallium/drivers/nvfx/Makefile
@@ -7,6 +7,7 @@ C_SOURCES = \
nvfx_clear.c \
nvfx_state_emit.c \
nvfx_state_blend.c \
+ nvfx_state_rasterizer.c \
nvfx_transfer.c
include ../../Makefile.template
diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h
index bbffb8a18d..c7ce17ab38 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.h
+++ b/src/gallium/drivers/nvfx/nvfx_context.h
@@ -183,6 +183,7 @@ struct nvfx_state_entry {
extern struct nvfx_state_entry nvfx_state_blend;
extern struct nvfx_state_entry nvfx_state_blend_colour;
+extern struct nvfx_state_entry nvfx_state_rasterizer;
/* nvfx_clear.c */
extern void nvfx_clear(struct pipe_context *pipe, unsigned buffers,
diff --git a/src/gallium/drivers/nvfx/nvfx_state_emit.c b/src/gallium/drivers/nvfx/nvfx_state_emit.c
index 059bbb14b7..60df50aa1c 100644
--- a/src/gallium/drivers/nvfx/nvfx_state_emit.c
+++ b/src/gallium/drivers/nvfx/nvfx_state_emit.c
@@ -6,7 +6,7 @@
#define RENDER_STATES(name, nvxx, vbo) \
static struct nvfx_state_entry *name##_render_states[] = { \
&nvxx##_state_framebuffer, \
- &nvxx##_state_rasterizer, \
+ &nvfx_state_rasterizer, \
&nvxx##_state_scissor, \
&nvxx##_state_stipple, \
&nvxx##_state_fragprog, \
diff --git a/src/gallium/drivers/nvfx/nvfx_state_rasterizer.c b/src/gallium/drivers/nvfx/nvfx_state_rasterizer.c
new file mode 100644
index 0000000000..0d35ecbf20
--- /dev/null
+++ b/src/gallium/drivers/nvfx/nvfx_state_rasterizer.c
@@ -0,0 +1,17 @@
+#include "nvfx_context.h"
+
+static boolean
+nvfx_state_rasterizer_validate(struct nvfx_context *nvfx)
+{
+ so_ref(nvfx->rasterizer->so,
+ &nvfx->state.hw[NVFX_STATE_RAST]);
+ return TRUE;
+}
+
+struct nvfx_state_entry nvfx_state_rasterizer = {
+ .validate = nvfx_state_rasterizer_validate,
+ .dirty = {
+ .pipe = NVFX_NEW_RAST,
+ .hw = NVFX_STATE_RAST
+ }
+};