void (*set_setup_state)( struct pipe_context *,
const struct pipe_setup_state * );
- void (*set_scissor_rect)( struct pipe_context *,
- const struct pipe_scissor_rect * );
+ void (*set_scissor_state)( struct pipe_context *,
+ const struct pipe_scissor_state * );
void (*set_stencil_state)( struct pipe_context *,
const struct pipe_stencil_state * );
GLuint unit,
struct pipe_texture_object * );
- void (*set_viewport)( struct pipe_context *,
- const struct pipe_viewport * );
+ void (*set_viewport_state)( struct pipe_context *,
+ const struct pipe_viewport_state * );
};
};
-struct pipe_viewport {
+struct pipe_viewport_state {
GLfloat scale[4];
GLfloat translate[4];
};
-struct pipe_scissor_rect {
+struct pipe_scissor_state {
GLshort minx;
GLshort miny;
GLshort maxx;
softpipe->pipe.set_clip_state = softpipe_set_clip_state;
softpipe->pipe.set_clear_color_state = softpipe_set_clear_color_state;
softpipe->pipe.set_depth_state = softpipe_set_depth_test_state;
- softpipe->pipe.set_viewport = softpipe_set_viewport;
+ softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
softpipe->pipe.set_setup_state = softpipe_set_setup_state;
- softpipe->pipe.set_scissor_rect = softpipe_set_scissor_rect;
+ softpipe->pipe.set_scissor_state = softpipe_set_scissor_state;
softpipe->pipe.set_fs_state = softpipe_set_fs_state;
softpipe->pipe.set_polygon_stipple = softpipe_set_polygon_stipple;
softpipe->pipe.set_sampler_state = softpipe_set_sampler_state;
/* 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;
- struct pipe_blend_state blend;
struct pipe_alpha_test_state alpha_test;
- struct pipe_clip_state clip;
- struct pipe_clear_color_state clear_color;
+ struct pipe_blend_state blend;
+ struct pipe_clear_color_state clear_color;
+ struct pipe_clip_state clip;
struct pipe_depth_state depth_test;
- struct pipe_scissor_rect scissor;
+ struct pipe_framebuffer_state framebuffer;
+ struct pipe_fs_state fs;
struct pipe_poly_stipple poly_stipple;
+ struct pipe_scissor_state scissor;
struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
+ struct pipe_setup_state setup;
struct pipe_texture_object *texture[PIPE_MAX_SAMPLERS];
+ struct pipe_viewport_state viewport;
GLuint dirty;
/* Clip derived state:
void softpipe_set_depth_test_state( struct pipe_context *,
const struct pipe_depth_state * );
-void softpipe_set_viewport( struct pipe_context *,
- const struct pipe_viewport * );
+void softpipe_set_viewport_state( struct pipe_context *,
+ const struct pipe_viewport_state * );
void softpipe_set_setup_state( struct pipe_context *,
const struct pipe_setup_state * );
GLuint unit,
struct pipe_texture_object * );
-void softpipe_set_scissor_rect( struct pipe_context *,
- const struct pipe_scissor_rect * );
+void softpipe_set_scissor_state( struct pipe_context *,
+ const struct pipe_scissor_state * );
void softpipe_set_fs_state( struct pipe_context *,
const struct pipe_fs_state * );
/* Called when driver state tracker notices changes to the viewport
* matrix:
*/
-void softpipe_set_viewport( struct pipe_context *pipe,
- const struct pipe_viewport *viewport )
+void softpipe_set_viewport_state( struct pipe_context *pipe,
+ const struct pipe_viewport_state *viewport )
{
struct softpipe_context *softpipe = softpipe_context(pipe);
-void softpipe_set_scissor_rect( struct pipe_context *pipe,
- const struct pipe_scissor_rect *scissor )
+void softpipe_set_scissor_state( struct pipe_context *pipe,
+ const struct pipe_scissor_state *scissor )
{
struct softpipe_context *softpipe = softpipe_context(pipe);
static void
update_scissor( struct st_context *st )
{
- struct pipe_scissor_rect scissor;
+ struct pipe_scissor_state scissor;
const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
scissor.minx = 0;
if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) {
/* state has changed */
st->state.scissor = scissor; /* struct copy */
- st->pipe->set_scissor_rect(st->pipe, &scissor); /* activate */
+ st->pipe->set_scissor_state(st->pipe, &scissor); /* activate */
}
}
GLfloat half_height = ctx->Viewport.Height / 2.0;
GLfloat half_depth = (ctx->Viewport.Far - ctx->Viewport.Near) / 2.0;
- struct pipe_viewport vp;
+ struct pipe_viewport_state vp;
vp.scale[0] = half_width;
vp.scale[1] = half_height * yScale;
if (memcmp(&vp, &st->state.viewport, sizeof(vp)) != 0) {
st->state.viewport = vp;
- st->pipe->set_viewport(st->pipe, &vp);
+ st->pipe->set_viewport_state(st->pipe, &vp);
}
}
}
* though, we just shove random objects across the interface.
*/
struct {
- struct pipe_framebuffer_state framebuffer;
- struct pipe_viewport viewport;
- struct pipe_setup_state setup;
- struct pipe_fs_state fs;
struct pipe_alpha_test_state alpha_test;
struct pipe_blend_state blend;
struct pipe_clear_color_state clear_color;
- struct pipe_clip_state clip;
- struct pipe_depth_state depth;
- struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
- struct pipe_scissor_rect scissor;
+ struct pipe_clip_state clip;
+ struct pipe_depth_state depth;
+ struct pipe_framebuffer_state framebuffer;
+ struct pipe_fs_state fs;
struct pipe_poly_stipple poly_stipple;
+ struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
+ struct pipe_scissor_state scissor;
+ struct pipe_setup_state setup;
struct pipe_stencil_state stencil;
+ struct pipe_viewport_state viewport;
} state;
struct {