v3d: Skip emitting per-RT blend state for RTs with blend disabled.

Cleans up the CL of fbo-drawbuffers2-blend a bit.  We could do better on
more complicated cases by noticing if multiple RTs have the same blend
state and emitting them in a single packet.
This commit is contained in:
Eric Anholt 2018-07-03 16:27:39 -07:00
parent 572f6ab489
commit 03f6d26b62

View file

@ -276,9 +276,15 @@ static void
emit_rt_blend(struct v3d_context *v3d, struct v3d_job *job,
struct pipe_blend_state *blend, int rt)
{
cl_emit(&job->bcl, BLEND_CONFIG, config) {
struct pipe_rt_blend_state *rtblend = &blend->rt[rt];
struct pipe_rt_blend_state *rtblend = &blend->rt[rt];
#if V3D_VERSION >= 40
/* We don't need to emit blend state for disabled RTs. */
if (!rtblend->blend_enable)
return;
#endif
cl_emit(&job->bcl, BLEND_CONFIG, config) {
#if V3D_VERSION >= 40
config.render_target_mask = 1 << rt;
#else