void (*set_depth_state)( struct pipe_context *,
const struct pipe_depth_state * );
- void (*set_point_state)( struct pipe_context *,
- const struct pipe_point_state * );
-
void (*set_framebuffer_state)( struct pipe_context *,
const struct pipe_framebuffer_state * );
GLuint offset_ccw:1;
GLuint scissor:1;
- GLuint poly_stipple:1;
+
GLuint poly_smooth:1;
+ GLuint poly_stipple_enable:1;
+
+ GLuint line_smooth:1;
+ GLuint line_stipple_enable:1;
+
+ GLuint point_smooth:1;
+ GLubyte line_stipple_factor; /**< [1..255] only */
+ GLushort line_stipple_pattern;
+ GLfloat line_width;
+ GLfloat point_size; /**< used when no per-vertex size */
GLfloat offset_units;
GLfloat offset_scale;
};
GLfloat color[4];
};
-/** XXXX probably merge into pipe_setup_state */
-struct pipe_line_state
-{
- GLuint smooth:1;
- GLuint stipple:1;
- GLushort stipple_pattern;
- GLint stipple_factor;
- GLfloat width;
-};
-
-/** XXXX probably merge into pipe_setup_state */
-struct pipe_point_state
-{
- GLuint smooth:1;
- GLfloat size;
- GLfloat min_size, max_size;
- GLfloat attenuation[3];
-};
-
struct pipe_stencil_state {
GLuint front_enabled:1;
GLuint front_func:3; /**< PIPE_FUNC_x */
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_point_state = softpipe_set_point_state;
softpipe->pipe.set_viewport = softpipe_set_viewport;
softpipe->pipe.set_setup_state = softpipe_set_setup_state;
softpipe->pipe.set_scissor_rect = softpipe_set_scissor_rect;
struct pipe_clip_state clip;
struct pipe_clear_color_state clear_color;
struct pipe_depth_state depth_test;
- struct pipe_point_state point;
struct pipe_scissor_rect scissor;
struct pipe_poly_stipple poly_stipple;
struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
{
struct setup_stage *setup = setup_stage( stage );
/*XXX this should be a vertex attrib! */
- GLfloat halfSize = 0.5 * setup->stage.softpipe->point.size;
- GLboolean round = setup->stage.softpipe->point.smooth;
+ GLfloat halfSize = 0.5 * setup->stage.softpipe->setup.point_size;
+ GLboolean round = setup->stage.softpipe->setup.point_smooth;
const struct vertex_header *v0 = prim->v[0];
const GLfloat x = v0->data[FRAG_ATTRIB_WPOS][0];
const GLfloat y = v0->data[FRAG_ATTRIB_WPOS][1];
void softpipe_set_fs_state( struct pipe_context *,
const struct pipe_fs_state * );
-void softpipe_set_point_state( struct pipe_context *,
- const struct pipe_point_state * );
-
void softpipe_set_polygon_stipple( struct pipe_context *,
const struct pipe_poly_stipple * );
pipe/softpipe/sp_state_clip.c \
pipe/softpipe/sp_state_derived.c \
pipe/softpipe/sp_state_fs.c \
- pipe/softpipe/sp_state_point.c \
- pipe/softpipe/sp_state_setup.c \
pipe/softpipe/sp_state_sampler.c \
+ pipe/softpipe/sp_state_setup.c \
pipe/softpipe/sp_state_surface.c
STATETRACKER_SOURCES = \
state_tracker/st_atom_depth.c \
state_tracker/st_atom_fs.c \
state_tracker/st_atom_framebuffer.c \
- state_tracker/st_atom_point.c \
state_tracker/st_atom_sampler.c \
state_tracker/st_atom_scissor.c \
- state_tracker/st_atom_stencil.c \
state_tracker/st_atom_setup.c \
+ state_tracker/st_atom_stencil.c \
state_tracker/st_atom_viewport.c \
state_tracker/st_cb_program.c \
state_tracker/st_draw.c \
&st_update_depth,
&st_update_clip,
&st_update_fs,
- &st_update_point,
&st_update_setup,
&st_update_viewport,
&st_update_scissor,
const struct st_tracked_state st_update_clear_color;
const struct st_tracked_state st_update_depth;
const struct st_tracked_state st_update_fs;
-const struct st_tracked_state st_update_point;
const struct st_tracked_state st_update_setup;
const struct st_tracked_state st_update_viewport;
const struct st_tracked_state st_update_constants;
ctx->Light.Model.TwoSide)
setup.light_twoside = 1;
- if (ctx->Polygon.SmoothFlag)
- setup.poly_smooth = 1;
-
- if (ctx->Polygon.StippleFlag)
- setup.poly_stipple = 1;
-
/* _NEW_POLYGON
*/
if (ctx->Polygon.CullFlag) {
if (setup.fill_ccw != PIPE_POLYGON_MODE_FILL)
setup.offset_ccw = get_offset_flag( setup.fill_ccw, &ctx->Polygon );
+ if (ctx->Polygon.SmoothFlag)
+ setup.poly_smooth = 1;
+
+ if (ctx->Polygon.StippleFlag)
+ setup.poly_stipple_enable = 1;
+
/* _NEW_BUFFERS, _NEW_POLYGON
*/
st->polygon_offset_scale);
}
+ /* _NEW_POINT
+ */
+ setup.point_size = ctx->Point.Size;
+ setup.point_smooth = ctx->Point.SmoothFlag;
+
+ /* _NEW_LINE
+ */
+ setup.line_width = ctx->Line.Width;
+ setup.line_smooth = ctx->Line.SmoothFlag;
+ setup.line_stipple_enable = ctx->Line.StippleFlag;
+ setup.line_stipple_pattern = ctx->Line.StipplePattern;
+ setup.line_stipple_factor = ctx->Line.StippleFactor;
+
if (memcmp(&setup, &st->state.setup, sizeof(setup)) != 0) {
st->state.setup = setup;
const struct st_tracked_state st_update_setup = {
.dirty = {
- .mesa = (_NEW_LIGHT | _NEW_POLYGON | _NEW_BUFFERS),
+ .mesa = (_NEW_LIGHT | _NEW_POLYGON | _NEW_LINE |
+ _NEW_POINT | _NEW_BUFFERS),
.st = 0,
},
.update = update_setup_state
struct pipe_clear_color_state clear_color;
struct pipe_clip_state clip;
struct pipe_depth_state depth;
- struct pipe_point_state point;
struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
struct pipe_scissor_rect scissor;
struct pipe_poly_stipple poly_stipple;