void (*set_clip_state)( struct softpipe_context *,
const struct softpipe_clip_state * );
+ void (*set_depth_state)( struct softpipe_context *,
+ const struct softpipe_depth_state * );
+
void (*set_viewport)( struct softpipe_context *,
const struct softpipe_viewport * );
#define SP_STENCIL_OP_DECR_WRAP 6
#define SP_STENCIL_OP_INVERT 7
+#define SP_DEPTH_FUNC_NEVER 0
+#define SP_DEPTH_FUNC_LESS 1
+#define SP_DEPTH_FUNC_EQUAL 2
+#define SP_DEPTH_FUNC_LEQUAL 3
+#define SP_DEPTH_FUNC_GREATER 4
+#define SP_DEPTH_FUNC_NOTEQUAL 5
+#define SP_DEPTH_FUNC_GEQUAL 6
+#define SP_DEPTH_FUNC_ALWAYS 7
+
+
#endif
};
+struct softpipe_depth_state
+{
+ GLuint enabled:1; /**< depth test enabled? */
+ GLuint writemask:1; /**< allow depth buffer writes? */
+ GLuint func:3; /**< depth test func */
+ GLfloat clear; /**< Clear value in [0,1] (XXX correct place?) */
+};
+
+
struct softpipe_blend_state {
GLuint blend_enable:1;
const struct st_tracked_state st_update_cbuf;
const struct st_tracked_state st_update_clip;
+const struct st_tracked_state st_update_depth;
const struct st_tracked_state st_update_fs;
const struct st_tracked_state st_update_setup;
const struct st_tracked_state st_update_viewport;
struct softpipe_blend_state blend;
struct softpipe_surface cbuf;
struct softpipe_clip_state clip;
+ struct softpipe_depth_state depth;
struct softpipe_scissor_rect scissor;
struct softpipe_poly_stipple poly_stipple;
struct softpipe_stencil_state stencil;