mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
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:
parent
572f6ab489
commit
03f6d26b62
1 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue