summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_surface.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-06-19 19:19:31 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-06-19 19:19:31 -0600
commitaf9b5ca0359b5712509d7815a7fbc81a3255f4af (patch)
treea9669c33d78e42d7925f60afd6e54037c39de2ac /src/mesa/pipe/softpipe/sp_surface.h
parent03933ad656e5bd776a2e6f93312ee90eff66d3d3 (diff)
Re-org of surface/framebuffer state.
We should be able to render to any depth/format of X window now.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_surface.h')
-rw-r--r--src/mesa/pipe/softpipe/sp_surface.h53
1 files changed, 8 insertions, 45 deletions
diff --git a/src/mesa/pipe/softpipe/sp_surface.h b/src/mesa/pipe/softpipe/sp_surface.h
index 08b6889257..dde6b90448 100644
--- a/src/mesa/pipe/softpipe/sp_surface.h
+++ b/src/mesa/pipe/softpipe/sp_surface.h
@@ -38,12 +38,16 @@ struct softpipe_surface;
#define G_SURFACE_RGBA_8888 0x1
-/* Internal structs and helpers for the primitive clip/setup pipeline:
+
+/**
+ * Softpipe surface is derived from pipe_surface.
*/
-struct softpipe_surface_type {
-
- GLuint format;
+struct softpipe_surface {
+ struct pipe_surface surface;
+ /**
+ * Functions for read/writing surface data
+ */
void (*read_quad_f)( struct softpipe_surface *,
GLint x, GLint y,
GLfloat (*rgba)[NUM_CHANNELS] );
@@ -69,47 +73,6 @@ struct softpipe_surface_type {
void (*write_quad_ub)( struct softpipe_surface *,
GLint x, GLint y,
GLubyte (*rgba)[NUM_CHANNELS] );
-
-
};
-
-struct softpipe_surface {
- struct softpipe_surface_type *type;
- struct pipe_surface surface;
-};
-
-
-static INLINE void gs_read_quad_f( struct softpipe_surface *gs,
- GLint x, GLint y,
- GLfloat (*rgba)[NUM_CHANNELS] )
-{
- gs->type->read_quad_f(gs, x, y, rgba);
-}
-
-static INLINE void gs_read_quad_f_swz( struct softpipe_surface *gs,
- GLint x, GLint y,
- GLfloat (*rrrr)[QUAD_SIZE] )
-{
- gs->type->read_quad_f_swz(gs, x, y, rrrr);
-}
-
-static INLINE void gs_write_quad_f( struct softpipe_surface *gs,
- GLint x, GLint y,
- GLfloat (*rgba)[NUM_CHANNELS] )
-{
- gs->type->write_quad_f(gs, x, y, rgba);
-}
-
-static INLINE void gs_write_quad_f_swz( struct softpipe_surface *gs,
- GLint x, GLint y,
- GLfloat (*rrrr)[QUAD_SIZE] )
-{
- gs->type->write_quad_f_swz(gs, x, y, rrrr);
-}
-
-/* Like this, or hidden?
- */
-struct softpipe_surface_type gs_rgba8;
-
#endif