summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-01-14 04:37:36 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-01 23:30:22 -0800
commitbbb1c6f6298fcb1125a8170f22646f326b0ca74c (patch)
treeae44531fde1cdb5bc0ad19e8bc1c1ec878b8aea1 /src/gallium/drivers/r300/r300_context.h
parent28bb7f3206f023a9d3cfa020da344a57118a2efb (diff)
r300: Add DSA state.
That's it for now. Just the "easy" stuff. Todo: - Rasterizer state, which is a lot more than just the RS. - Miscellaneous state which doesn't currently belong to any state object. - Shader assemblers? - Fix dynamic loading bugs.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 6c64c9fa83..81c559cedf 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -34,13 +34,24 @@ struct r300_blend_state {
uint32_t dither; /* R300_RB3D_DITHER_CTL: 0x4e50 */
};
+struct r300_dsa_state {
+ uint32_t alpha_function; /* R300_FG_ALPHA_FUNC: 0x4bd4 */
+ uint32_t alpha_reference; /* R500_FG_ALPHA_VALUE: 0x4be0 */
+ uint32_t z_buffer_control; /* R300_ZB_CNTL: 0x4f00 */
+ uint32_t z_stencil_control; /* R300_ZB_ZSTENCILCNTL: 0x4f04 */
+ uint32_t stencil_ref_mask; /* R300_ZB_STENCILREFMASK: 0x4f08 */
+ uint32_t z_buffer_top; /* R300_ZB_ZTOP: 0x4f14 */
+ uint32_t stencil_ref_bf; /* R300_ZB_STENCILREFMASK_BF: 0x4fd4 */
+};
+
struct r300_scissor_state {
uint32_t scissor_top_left; /* R300_SC_SCISSORS_TL: 0x43e0 */
uint32_t scissor_bottom_right; /* R300_SC_SCISSORS_BR: 0x43e4 */
};
#define R300_NEW_BLEND 0x1
-#define R300_NEW_SCISSOR 0x2
+#define R300_NEW_DSA 0x2
+#define R300_NEW_SCISSOR 0x4
struct r300_context {
/* Parent class */
@@ -54,6 +65,8 @@ struct r300_context {
/* Various CSO state objects. */
/* Blend state. */
struct r300_blend_state* blend_state;
+ /* Depth, stencil, and alpha state. */
+ struct r300_dsa_state* dsa_state;
/* Scissor state. */
struct r300_scissor_state* scissor_state;