From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 96355] Performance: extra&costly SSBO validation even when SSBO aren't used Date: Sun, 05 Jun 2016 15:41:58 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0135651917==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============0135651917== Content-Type: multipart/alternative; boundary="14651413180.3dcf84DD.20136"; charset="UTF-8" --14651413180.3dcf84DD.20136 Date: Sun, 5 Jun 2016 15:41:58 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D96355 --- Comment #11 from Ilia Mirkin --- (In reply to gregory.hainaut from comment #10) > Hi Ilia, >=20 > You told me by IRC that you validate all SSBOs when one is updated. I > suspecting a similar patter for UBO. I.e. all UBOs are validated when one= is > updated. Nope. UBOs (and textures) have their individual validation "buckets". >=20 > Potentially validation is even done for all shader stages. Anyway, I move= a > bit my UBO declaration to reduce the number of active UBO for a draw call. > And I managed to win a couples of fps (67 fps =3D> 70 fps). >=20 > So it might worth to investigate further the single SSBO/UBO bucket > validation. There are different stages of validation. It's all extremely confusing. st/= mesa validates everything, because it has to - which UBO is bound to where is ba= sed on program uniform settings: binding =3D &st->ctx->UniformBufferBindings[shader->UniformBlocks[i]->Binding]; So if either of those are updated, we have to revalidate. However there's a= CSO cache backing UBOs, which will avoid propagating the set to the backend if nothing has changed. I don't think we can do much better than this without some much larger rejiggers. Perhaps there are still some things we can do to speed up common scenarios = like "there are no ubos" or "there are no ssbos" or "there are no images". But it doesn't seem immediately apparent to me. --=20 You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.= --14651413180.3dcf84DD.20136 Date: Sun, 5 Jun 2016 15:41:58 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 11 on bug 96355<= /a> from Ilia Mirkin
(In reply to gregory.hainaut from comment #10)
> Hi Ilia,
>=20
> You told me by IRC that you validate all SSBOs when one is updated. I
> suspecting a similar patter for UBO. I.e. all UBOs are validated when =
one is
> updated.

Nope. UBOs (and textures) have their individual validation "buckets&qu=
ot;.

>=20
> Potentially validation is even done for all shader stages. Anyway, I m=
ove a
> bit my UBO declaration to reduce the number of active UBO for a draw c=
all.
> And I managed to win a couples of fps (67 fps =3D> 70 fps).
>=20
> So it might worth to investigate further the single SSBO/UBO bucket
> validation.

There are different stages of validation. It's all extremely confusing. st/=
mesa
validates everything, because it has to - which UBO is bound to where is ba=
sed
on program uniform settings:

      binding =3D
&st->ctx->UniformBufferBindings[shader->UniformBlocks[i]->B=
inding];

So if either of those are updated, we have to revalidate. However there's a=
 CSO
cache backing UBOs, which will avoid propagating the set to the backend if
nothing has changed.

I don't think we can do much better than this without some much larger
rejiggers.

Perhaps there are still some things we can do to speed up common scenarios =
like
"there are no ubos" or "there are no ssbos" or "th=
ere are no images". But it
doesn't seem immediately apparent to me.


You are receiving this mail because:
  • You are the QA Contact for the bug.
  • You are the assignee for the bug.
= --14651413180.3dcf84DD.20136-- --===============0135651917== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============0135651917==--