diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_emit.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 15 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c index 9c97bb6c25d..4402218f404 100644 --- a/src/gallium/drivers/v3d/v3dx_emit.c +++ b/src/gallium/drivers/v3d/v3dx_emit.c @@ -286,7 +286,10 @@ emit_rt_blend(struct v3d_context *v3d, struct v3d_job *job, cl_emit(&job->bcl, BLEND_CONFIG, config) { #if V3D_VERSION >= 40 - config.render_target_mask = 1 << rt; + if (blend->independent_blend_enable) + config.render_target_mask = 1 << rt; + else + config.render_target_mask = (1 << VC5_MAX_DRAW_BUFFERS) - 1; #else assert(rt == 0); #endif diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index f775c531e5f..a092b1fb9e1 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -126,12 +126,17 @@ v3d_create_blend_state(struct pipe_context *pctx, so->base = *cso; - for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { - so->blend_enables |= cso->rt[i].blend_enable << i; + if (cso->independent_blend_enable) { + for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) { + so->blend_enables |= cso->rt[i].blend_enable << i; - /* V3D 4.x is when we got independent blend enables. */ - assert(V3D_VERSION >= 40 || - cso->rt[i].blend_enable == cso->rt[0].blend_enable); + /* V3D 4.x is when we got independent blend enables. */ + assert(V3D_VERSION >= 40 || + cso->rt[i].blend_enable == cso->rt[0].blend_enable); + } + } else { + if (cso->rt[0].blend_enable) + so->blend_enables = (1 << VC5_MAX_DRAW_BUFFERS) - 1; } return so; |