summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-21 12:32:38 -0700
committerBrian <[email protected]>2008-02-21 12:33:30 -0700
commita93d8bfaf2aba1b2fe3ecfbb5bc4b7ff113c305e (patch)
treede95914a12c571ac0ff63de08bab161bda626e52
parentd4d2e36a429fd015316c484fc40be7e6d2c69946 (diff)
gallium: fill in some blend/rasterizer template fields to make sure they're all valid, even if not relevant
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index a0b4b973aa6..c9765b20036 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -111,14 +111,22 @@ st_init_generate_mipmap(struct st_context *st)
struct pipe_rasterizer_state rasterizer;
struct pipe_depth_stencil_alpha_state depthstencil;
+ /* we don't use blending, but need to set valid values */
memset(&blend, 0, sizeof(blend));
+ blend.rgb_src_factor = PIPE_BLENDFACTOR_ONE;
+ blend.alpha_src_factor = PIPE_BLENDFACTOR_ONE;
+ blend.rgb_dst_factor = PIPE_BLENDFACTOR_ZERO;
+ blend.alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
blend.colormask = PIPE_MASK_RGBA;
st->gen_mipmap.blend_cso = pipe->create_blend_state(pipe, &blend);
memset(&depthstencil, 0, sizeof(depthstencil));
st->gen_mipmap.depthstencil_cso = pipe->create_depth_stencil_alpha_state(pipe, &depthstencil);
+ /* Note: we're assuming zero is valid for all non-specified fields */
memset(&rasterizer, 0, sizeof(rasterizer));
+ rasterizer.front_winding = PIPE_WINDING_CW;
+ rasterizer.cull_mode = PIPE_WINDING_NONE;
st->gen_mipmap.rasterizer_cso = pipe->create_rasterizer_state(pipe, &rasterizer);
st->gen_mipmap.stfp = make_tex_fragment_program(st->ctx);