mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
mesa: optimize _UsesDualSrc blend flag setting
For glBlendFunc and glBlendFuncSeparate(), the _UsesDualSrc flag will be the same for all buffers, so no need to compute it N times. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
d21e17f48f
commit
dfbd62e772
1 changed files with 6 additions and 1 deletions
|
|
@ -255,8 +255,13 @@ _mesa_BlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRGB,
|
|||
ctx->Color.Blend[buf].DstRGB = dfactorRGB;
|
||||
ctx->Color.Blend[buf].SrcA = sfactorA;
|
||||
ctx->Color.Blend[buf].DstA = dfactorA;
|
||||
update_uses_dual_src(ctx, buf);
|
||||
}
|
||||
|
||||
update_uses_dual_src(ctx, 0);
|
||||
for (buf = 1; buf < numBuffers; buf++) {
|
||||
ctx->Color.Blend[buf]._UsesDualSrc = ctx->Color.Blend[0]._UsesDualSrc;
|
||||
}
|
||||
|
||||
ctx->Color._BlendFuncPerBuffer = GL_FALSE;
|
||||
|
||||
if (ctx->Driver.BlendFuncSeparate) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue