mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 14:40:10 +01:00
gallium: fill in some blend/rasterizer template fields to make sure they're all valid, even if not relevant
This commit is contained in:
parent
d4d2e36a42
commit
a93d8bfaf2
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue