summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r--src/gallium/drivers/nv30/Makefile1
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h7
-rw-r--r--src/gallium/drivers/nv30/nv30_state_rasterizer.c17
3 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/Makefile b/src/gallium/drivers/nv30/Makefile
index 04f53ee4565..c5208fabf5e 100644
--- a/src/gallium/drivers/nv30/Makefile
+++ b/src/gallium/drivers/nv30/Makefile
@@ -16,6 +16,7 @@ DRIVER_SOURCES = \
nv30_state_blend.c \
nv30_state_emit.c \
nv30_state_fb.c \
+ nv30_state_rasterizer.c \
nv30_surface.c \
nv30_vbo.c \
nv30_vertprog.c
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index 1695ba5a017..43ee8d13a0c 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -77,6 +77,12 @@ enum nv30_state_index {
#define NV30_NEW_UCP (1 << 12)
/* TODO: rename when removing the old state emitter */
+struct nv30_rasterizer_state_new {
+ struct pipe_rasterizer_state pipe;
+ struct nouveau_stateobj *so;
+};
+
+/* TODO: rename when removing the old state emitter */
struct nv30_blend_state_new {
struct pipe_blend_state pipe;
struct nouveau_stateobj *so;
@@ -111,6 +117,7 @@ struct nv30_context {
struct nv30_blend_state_new *blend;
struct pipe_blend_color blend_colour;
struct pipe_framebuffer_state framebuffer;
+ struct nv30_rasterizer_state_new *rasterizer;
uint32_t rt_enable;
struct pipe_buffer *rt[2];
diff --git a/src/gallium/drivers/nv30/nv30_state_rasterizer.c b/src/gallium/drivers/nv30/nv30_state_rasterizer.c
new file mode 100644
index 00000000000..6d1b60e043d
--- /dev/null
+++ b/src/gallium/drivers/nv30/nv30_state_rasterizer.c
@@ -0,0 +1,17 @@
+#include "nv30_context.h"
+
+static boolean
+nv30_state_rasterizer_validate(struct nv30_context *nv30)
+{
+ so_ref(nv30->rasterizer->so,
+ &nv30->state.hw[NV30_STATE_RAST]);
+ return TRUE;
+}
+
+struct nv30_state_entry nv30_state_rasterizer = {
+ .validate = nv30_state_rasterizer_validate,
+ .dirty = {
+ .pipe = NV30_NEW_RAST,
+ .hw = NV30_STATE_RAST
+ }
+};