[Mesa-dev] [PATCH] i965: Drop mark_surface_used mechanism.

Kenneth Graunke kenneth at whitecape.org
Sun Dec 30 22:56:57 UTC 2018


On Sunday, December 30, 2018 11:22:01 AM PST Matt Turner wrote:
> On Sun, Dec 30, 2018 at 1:01 AM Kenneth Graunke <kenneth at whitecape.org> wrote:
> >
> > The original idea was that the backend compiler could eliminate
> > surfaces, so we would have it mark which ones are actually used,
> > then shrink the binding table accordingly.  Unfortunately, it's a
> > pretty blunt mechanism - it can only prune things from the end,
> > not the middle - since we decide the layout before we even start
> > the backend compiler, and only limit the size.  It also basically
> > gives up if it sees indirect array access.
> >
> > Besides, we do the vast majority of our surface elimination in NIR
> > anyway, not the backend - and I don't see that trend changing any
> > time soon.  Vulkan abandoned this plan a long time ago, and I don't
> > use it in Iris, but it's still been kicking around in i965.
> 
> Obvious question that you should answer in the commit message: Does
> this code do anything useful?
> 
> I would hope the answer is no, otherwise I think we should keep it
> until NIR handles everything it does.

Good point, I had neglected to measure.  I just tried the patch on
shader-db, and there was not a single instance of the binding table
size changing.  That seems compelling enough.

I've added this to the commit message:

    I hacked shader-db to print the binding table size in bytes, and
    observed no changes with this patch.  So, this code appears to do
    nothing useful.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181230/33dedde8/attachment.sig>


More information about the mesa-dev mailing list