summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-06-15 09:51:53 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-06-15 09:51:53 -0600
commit8f6b6eed35832733674372dea7bd5ce69a965c4e (patch)
treea84f76001c2706ec56f05017bc56c404ae62b2ae /src/mesa/pipe
parentfe1f94f26c5cb43934513a38f60bf00aa542e64c (diff)
initial framebuffer state
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/p_context.h3
-rw-r--r--src/mesa/pipe/p_state.h15
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h1
3 files changed, 18 insertions, 1 deletions
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h
index dc7a80744a..5c9b9b14fe 100644
--- a/src/mesa/pipe/p_context.h
+++ b/src/mesa/pipe/p_context.h
@@ -59,6 +59,9 @@ struct pipe_context {
void (*set_blend_state)( struct pipe_context *,
const struct pipe_blend_state * );
+ void (*set_framebuffer_state)( struct pipe_context *,
+ const struct pipe_framebuffer_state * );
+
void (*set_cbuf_state)( struct pipe_context *,
const struct pipe_surface * );
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 7264f253d9..dba1e11715 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -149,7 +149,9 @@ struct pipe_stencil_state {
/* This will change for hardware pipes...
*/
-struct pipe_surface {
+struct pipe_surface
+{
+ GLuint width, height;
GLubyte *ptr;
GLint stride;
GLuint cpp;
@@ -157,6 +159,17 @@ struct pipe_surface {
};
+struct pipe_framebuffer_state
+{
+ GLuint num_cbufs; /**< Number of color bufs to draw to */
+ struct pipe_surface *cbufs[4]; /**< OpenGL can write to as many as
+ 4 color buffers at once */
+ struct pipe_surface *zbuf; /**< Z buffer */
+ struct pipe_surface *sbuf; /**< Stencil buffer */
+ struct pipe_surface *abuf; /**< Accum buffer */
+};
+
+
/**
* Texture sampler state.
*/
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index da6c17aaf6..9050b59f77 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -67,6 +67,7 @@ struct softpipe_context {
/* The most recent drawing state as set by the driver:
*/
+ struct pipe_framebuffer_state framebuffer;
struct pipe_viewport viewport;
struct pipe_setup_state setup;
struct pipe_fs_state fs;