summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-08-14 00:20:52 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-08-14 00:20:52 +1000
commit56f5c0c001c476b813c94d071ac880fbe8d9768b (patch)
tree257e2d7c3870a741ad30ea7bc38621d9eb728483 /src/gallium/include/pipe
parentdf4228deddea36b9d5b41ea395a216137e046205 (diff)
parentd8be393cb60d908f98f0edb74c1c7964e8f690fe (diff)
Merge remote branch 'origin/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_compiler.h5
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h4
-rw-r--r--src/gallium/include/pipe/p_state.h51
3 files changed, 37 insertions, 23 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 2afb8464c7..4d64c74a4a 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -31,8 +31,13 @@
#include "p_config.h"
+#ifndef XFree86Server
#include <stdlib.h>
#include <string.h>
+#else
+#include "xf86_ansic.h"
+#include "xf86_libc.h"
+#endif
#if defined(_WIN32) && !defined(__WIN32__)
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index ed931d24b9..3ab0c7deaf 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -240,6 +240,7 @@ struct tgsi_immediate_float32
* GL_ARB_fragment_program
*/
#define TGSI_OPCODE_CMP 66
+#define TGSI_OPCODE_KIL 116 /* conditional kill */
#define TGSI_OPCODE_SCS 67
#define TGSI_OPCODE_TXB 68
@@ -327,7 +328,7 @@ struct tgsi_immediate_float32
/*
* ps_1_1
*/
-#define TGSI_OPCODE_TEXKILL TGSI_OPCODE_KILP
+#define TGSI_OPCODE_TEXKILL TGSI_OPCODE_KIL
/*
* ps_1_2
@@ -386,7 +387,6 @@ struct tgsi_immediate_float32
* vs_2_x
*/
-#define TGSI_OPCODE_KIL 116 /* unpredicated kill */
#define TGSI_OPCODE_END 117 /* aka HALT */
#define TGSI_OPCODE_LAST 119
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 2401305eb7..4d0f3597e6 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -170,29 +170,38 @@ struct pipe_shader_state
};
+struct pipe_depth_state {
+ unsigned enabled:1; /**< depth test enabled? */
+ unsigned writemask:1; /**< allow depth buffer writes? */
+ unsigned func:3; /**< depth test func (PIPE_FUNC_x) */
+ unsigned occlusion_count:1; /**< do occlusion counting? */
+};
+
+
+struct pipe_stencil_state {
+ unsigned enabled:1; /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */
+ unsigned func:3; /**< PIPE_FUNC_x */
+ unsigned fail_op:3; /**< PIPE_STENCIL_OP_x */
+ unsigned zpass_op:3; /**< PIPE_STENCIL_OP_x */
+ unsigned zfail_op:3; /**< PIPE_STENCIL_OP_x */
+ ubyte ref_value;
+ ubyte value_mask;
+ ubyte write_mask;
+};
+
+
+struct pipe_alpha_state {
+ unsigned enabled:1;
+ unsigned func:3; /**< PIPE_FUNC_x */
+ float ref; /**< reference value */
+};
+
+
struct pipe_depth_stencil_alpha_state
{
- struct {
- unsigned enabled:1; /**< depth test enabled? */
- unsigned writemask:1; /**< allow depth buffer writes? */
- unsigned func:3; /**< depth test func (PIPE_FUNC_x) */
- unsigned occlusion_count:1; /**< do occlusion counting? */
- } depth;
- struct {
- unsigned enabled:1; /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */
- unsigned func:3; /**< PIPE_FUNC_x */
- unsigned fail_op:3; /**< PIPE_STENCIL_OP_x */
- unsigned zpass_op:3; /**< PIPE_STENCIL_OP_x */
- unsigned zfail_op:3; /**< PIPE_STENCIL_OP_x */
- ubyte ref_value;
- ubyte value_mask;
- ubyte write_mask;
- } stencil[2]; /**< [0] = front, [1] = back */
- struct {
- unsigned enabled:1;
- unsigned func:3; /**< PIPE_FUNC_x */
- float ref; /**< reference value */
- } alpha;
+ struct pipe_depth_state depth;
+ struct pipe_stencil_state stencil[2]; /**< [0] = front, [1] = back */
+ struct pipe_alpha_state alpha;
};