void polygon_fill(struct polygon *poly, struct vg_context *ctx)
{
struct pipe_depth_stencil_alpha_state dsa;
+ struct pipe_stencil_ref sr;
struct pipe_blend_state blend;
VGfloat bounds[4];
VGfloat min_x, min_y, max_x, max_y;
set_blend_for_fill(&blend);
memset(&dsa, 0, sizeof(struct pipe_depth_stencil_alpha_state));
+ memset(&sr, 0, sizeof(struct pipe_stencil_ref));
+ /* only need a fixed 0. Rely on default or move it out at least? */
+ cso_set_stencil_ref(ctx->cso_context, &sr);
cso_save_blend(ctx->cso_context);
cso_save_depth_stencil_alpha(ctx->cso_context);
dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_KEEP;
dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_INVERT;
dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = ~0;
cso_set_blend(ctx->cso_context, &blend);
dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_KEEP;
dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_INCR_WRAP;
dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = ~0;
/* back */
dsa.stencil[1].zfail_op = PIPE_STENCIL_OP_KEEP;
dsa.stencil[1].zpass_op = PIPE_STENCIL_OP_DECR_WRAP;
dsa.stencil[1].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[1].ref_value = 0;
dsa.stencil[1].valuemask = ~0;
cso_set_blend(ctx->cso_context, &blend);
cso_save_rasterizer(ctx->cso_context);
dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = ~0;
raster.cull_mode = raster.front_winding ^ PIPE_WINDING_BOTH;
dsa.stencil[0].fail_op = PIPE_STENCIL_OP_REPLACE;
dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_REPLACE;
dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = dsa.stencil[0].writemask;
dsa.stencil[1].enabled = 0;
memcpy(&dsa.depth, &ctx->state.g3d.dsa.depth,
{
struct array *polys = polyarray->array;
struct pipe_depth_stencil_alpha_state dsa;
+ struct pipe_stencil_ref sr;
struct pipe_blend_state blend;
VGfloat min_x = polyarray->min_x;
VGfloat min_y = polyarray->min_y;
set_blend_for_fill(&blend);
memset(&dsa, 0, sizeof(struct pipe_depth_stencil_alpha_state));
+ memset(&sr, 0, sizeof(struct pipe_stencil_ref));
+ /* only need a fixed 0. Rely on default or move it out at least? */
+ cso_set_stencil_ref(ctx->cso_context, &sr);
cso_save_blend(ctx->cso_context);
cso_save_depth_stencil_alpha(ctx->cso_context);
dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_KEEP;
dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_INVERT;
dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = ~0;
cso_set_blend(ctx->cso_context, &blend);
dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_KEEP;
dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_INCR_WRAP;
dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = ~0;
/* back */
dsa.stencil[1].zfail_op = PIPE_STENCIL_OP_KEEP;
dsa.stencil[1].zpass_op = PIPE_STENCIL_OP_DECR_WRAP;
dsa.stencil[1].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[1].ref_value = 0;
dsa.stencil[1].valuemask = ~0;
cso_set_blend(ctx->cso_context, &blend);
cso_save_rasterizer(ctx->cso_context);
dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = ~0;
raster.cull_mode = raster.front_winding ^ PIPE_WINDING_BOTH;
dsa.stencil[0].fail_op = PIPE_STENCIL_OP_REPLACE;
dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_REPLACE;
dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
- dsa.stencil[0].ref_value = 0;
dsa.stencil[0].valuemask = dsa.stencil[0].writemask;
dsa.stencil[1].enabled = 0;
memcpy(&dsa.depth, &ctx->state.g3d.dsa.depth,