From: Brian Date: Fri, 15 Jun 2007 16:54:08 +0000 (-0600) Subject: framebuffer state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1119852d0272c5ae43b09024b61f6e53c356ee65;p=mesa.git framebuffer state --- diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 8e547cbdc39..9a054265fb1 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -66,6 +66,7 @@ struct pipe_context *softpipe_create( void ) struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context); softpipe->pipe.destroy = softpipe_destroy; + softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; softpipe->pipe.set_clip_state = softpipe_set_clip_state; softpipe->pipe.set_viewport = softpipe_set_viewport; softpipe->pipe.set_setup_state = softpipe_set_setup_state; diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h index 9050b59f77c..f2ebc4272a6 100644 --- a/src/mesa/pipe/softpipe/sp_context.h +++ b/src/mesa/pipe/softpipe/sp_context.h @@ -58,7 +58,7 @@ enum interp_mode { #define G_NEW_CLIP 0x20 #define G_NEW_SCISSOR 0x40 #define G_NEW_STIPPLE 0x80 - +#define G_NEW_FRAMEBUFFER 0x100 struct softpipe_context { diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h index 2abefc60372..14afce157e8 100644 --- a/src/mesa/pipe/softpipe/sp_state.h +++ b/src/mesa/pipe/softpipe/sp_state.h @@ -35,6 +35,9 @@ #include "pipe/p_state.h" +void softpipe_set_framebuffer_state( struct pipe_context *, + const struct pipe_framebuffer_state * ); + void softpipe_set_clip_state( struct pipe_context *, const struct pipe_clip_state * ); diff --git a/src/mesa/pipe/softpipe/sp_state_surface.c b/src/mesa/pipe/softpipe/sp_state_surface.c index 989f2e29d8c..d089fe06322 100644 --- a/src/mesa/pipe/softpipe/sp_state_surface.c +++ b/src/mesa/pipe/softpipe/sp_state_surface.c @@ -51,3 +51,17 @@ void softpipe_set_cbuf_state( struct pipe_context *pipe, } +/* + * XXX this might get moved someday + */ +void softpipe_set_framebuffer_state( struct pipe_context *pipe, + const struct pipe_framebuffer_state *fb ) +{ + struct softpipe_context *softpipe = softpipe_context(pipe); + + softpipe->framebuffer = *fb; /* struct copy */ + + softpipe->dirty |= G_NEW_FRAMEBUFFER; +} + +