summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/p_state.h')
-rw-r--r--src/mesa/pipe/p_state.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 16d50fdb82..46328d2a8f 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -39,6 +39,7 @@
#define PIPE_STATE_H
#include "p_compiler.h"
+#include "p_defines.h"
#include "p_format.h"
/**
@@ -55,18 +56,13 @@
#define PIPE_MAX_SHADER_OUTPUTS 16
-/* fwd decl */
+/* fwd decls */
struct pipe_surface;
+struct pipe_winsys;
/* opaque type */
struct pipe_buffer_handle;
-struct pipe_winsys;
-
-
-/***
- *** State objects
- ***/
/**
@@ -114,6 +110,7 @@ struct pipe_viewport_state {
float translate[4];
};
+
struct pipe_scissor_state {
unsigned minx:16;
unsigned miny:16;
@@ -121,6 +118,7 @@ struct pipe_scissor_state {
unsigned maxy:16;
};
+
struct pipe_clip_state {
float ucp[PIPE_MAX_CLIP_PLANES][4];
unsigned nr;
@@ -147,13 +145,14 @@ struct pipe_shader_state {
ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
};
+
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; /**< XXX move this elsewhere? */
+ 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;
@@ -164,12 +163,11 @@ struct pipe_depth_stencil_alpha_state
ubyte ref_value;
ubyte value_mask;
ubyte write_mask;
- } stencil[2]; /**< [0] = front, [1] = back */
-
+ } stencil[2]; /**< [0] = front, [1] = back */
struct {
unsigned enabled:1;
- unsigned func:3; /**< PIPE_FUNC_x */
- float ref; /**< reference value */
+ unsigned func:3; /**< PIPE_FUNC_x */
+ float ref; /**< reference value */
} alpha;
};
@@ -192,10 +190,12 @@ struct pipe_blend_state {
unsigned dither:1;
};
+
struct pipe_blend_color {
float color[4];
};
+
struct pipe_framebuffer_state
{
/** multiple colorbuffers for multiple render targets */
@@ -242,9 +242,9 @@ struct pipe_sampler_state
struct pipe_surface
{
struct pipe_buffer_handle *buffer; /**< driver private buffer handle */
- ubyte *map; /**< only non-NULL when surface is actually mapped */
- unsigned map_refcount; /**< Reference count for mapping */
enum pipe_format format; /**< PIPE_FORMAT_x */
+ unsigned status; /**< PIPE_SURFACE_STATUS_x */
+ unsigned clear_value; /**< may be temporary */
unsigned cpp; /**< bytes per pixel */
unsigned width, height;
unsigned pitch; /**< in pixels */
@@ -262,8 +262,8 @@ struct pipe_texture
{
/* Effectively the key:
*/
- unsigned target; /**< PIPE_TEXTURE_x */
- enum pipe_format format; /**< PIPE_FORMAT_x */
+ enum pipe_texture_target target; /**< PIPE_TEXTURE_x */
+ enum pipe_format format; /**< PIPE_FORMAT_x */
unsigned first_level;
unsigned last_level;
@@ -313,5 +313,4 @@ struct pipe_vertex_element
};
-
#endif