summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-06-23 21:46:51 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-06-23 21:46:51 +0200
commit95fe122f67024f55d555e2816a95409a8b53a49e (patch)
tree2ac913c8ccc383198560015cadd26df3838a24be /src/gallium
parent0e1b36b0b257bfba4427a1e6e12c918e744b9977 (diff)
nv30: add state zsa, based on nv40 one
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv30/Makefile1
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h6
-rw-r--r--src/gallium/drivers/nv30/nv30_state_zsa.c17
3 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/Makefile b/src/gallium/drivers/nv30/Makefile
index a6a8cf1df9..69f2790dfe 100644
--- a/src/gallium/drivers/nv30/Makefile
+++ b/src/gallium/drivers/nv30/Makefile
@@ -20,6 +20,7 @@ DRIVER_SOURCES = \
nv30_state_scissor.c \
nv30_state_stipple.c \
nv30_state_viewport.c \
+ nv30_state_zsa.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 eb7e5a8b12..dce077b2b4 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -82,6 +82,11 @@ struct nv30_rasterizer_state_new {
struct nouveau_stateobj *so;
};
+struct nv30_zsa_state {
+ struct pipe_depth_stencil_alpha_state pipe;
+ struct nouveau_stateobj *so;
+};
+
/* TODO: rename when removing the old state emitter */
struct nv30_blend_state_new {
struct pipe_blend_state pipe;
@@ -124,6 +129,7 @@ struct nv30_context {
struct pipe_viewport_state viewport;
struct pipe_framebuffer_state framebuffer;
struct nv30_rasterizer_state_new *rasterizer;
+ struct nv30_zsa_state *zsa;
unsigned stipple[32];
uint32_t rt_enable;
diff --git a/src/gallium/drivers/nv30/nv30_state_zsa.c b/src/gallium/drivers/nv30/nv30_state_zsa.c
new file mode 100644
index 0000000000..0940b7269b
--- /dev/null
+++ b/src/gallium/drivers/nv30/nv30_state_zsa.c
@@ -0,0 +1,17 @@
+#include "nv30_context.h"
+
+static boolean
+nv30_state_zsa_validate(struct nv30_context *nv30)
+{
+ so_ref(nv30->zsa->so,
+ &nv30->state.hw[NV30_STATE_ZSA]);
+ return TRUE;
+}
+
+struct nv30_state_entry nv30_state_zsa = {
+ .validate = nv30_state_zsa_validate,
+ .dirty = {
+ .pipe = NV30_NEW_ZSA,
+ .hw = NV30_STATE_ZSA
+ }
+};