[Bug 95438] Elemental demo compute shader takes ages to compile

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 17 02:30:52 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=95438

--- Comment #1 from Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> ---
Last I looked at the elemental demo, we have multiple issues:

- The shared array (1024 elements) get wrongly promoted to a private array.
There is a fix for that at
https://lists.freedesktop.org/archives/mesa-dev/2016-April/113832.html

- in radeonsi we compile arrays to vectors with insert/extract element. This
pretty much results in the array being SSA version, which results in a very
large program.

- a 1024 element vector does not fit in 256 VGPR's so LLVM tries to load and
spill around every operation and therefore every versioned array element takes
scratch space.

- As a result I needed 7 MiB of scratch space per wave, or 6,7 GiB in total. 
This overflows the 32-bit buffer size and we only allocate a smaller buffer.

-  This resulted in hangs (or maybe long long shader execution times, not
really sure...).

So not sure how long a long long time is, last I tried (which admittedly is
some weeks ago) I certainly could get past the compilation stage. If you did
get past that and did not get hangs, I'm not sure why.

Fixing the first problem also circumvents problems 2 & 3, although it would be
nice to get those fixed as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160517/d1b01f24/attachment.html>


More information about the dri-devel mailing list