mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
mesa: only emit _NEW_MULTISAMPLE when coverage parameters change
We usually check that given parameters are different before updating the state. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
9cd69022d5
commit
706e31fe5a
1 changed files with 7 additions and 3 deletions
|
|
@ -41,11 +41,15 @@ _mesa_SampleCoverage(GLclampf value, GLboolean invert)
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
value = CLAMP(value, 0.0f, 1.0f);
|
||||
|
||||
ctx->Multisample.SampleCoverageValue = CLAMP(value, 0.0f, 1.0f);
|
||||
if (ctx->Multisample.SampleCoverageInvert == invert &&
|
||||
ctx->Multisample.SampleCoverageValue == value)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
|
||||
ctx->Multisample.SampleCoverageValue = value;
|
||||
ctx->Multisample.SampleCoverageInvert = invert;
|
||||
ctx->NewState |= _NEW_MULTISAMPLE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue