Bug 84053 - Large shaders using UBOs take a long time to compile
Summary: Large shaders using UBOs take a long time to compile
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All All
: medium minor
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 15:26 UTC by Ian Romanick
Modified: 2019-09-25 18:52 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Sample shader (1.04 MB, text/plain)
2014-09-18 15:26 UTC, Ian Romanick
Details
Faster version of the same test (1.02 MB, text/plain)
2014-09-18 16:18 UTC, Ian Romanick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Romanick 2014-09-18 15:26:14 UTC
Created attachment 106510 [details]
Sample shader

For example, the attached shader-runner test took 25 minutes on my IVB laptop.  On a debug build of Mesa (with -O1), Sysprof says that ~90% of the time is spent in brw::vec4_live_variables::compute_live_variables().

Changing the test to do

    pass = !(condition) && pass;

instead of

    if (condition)
        pass = false;

appears to end the slaughter.
Comment 1 Ian Romanick 2014-09-18 16:18:19 UTC
Created attachment 106512 [details]
Faster version of the same test

This version only takes ~30 seconds on the same system.  Looking at sysprof data, it appears that ~80% of that is spent in shader_runner parsing the test file. :)
Comment 2 Juan A. Suarez 2016-11-03 15:55:32 UTC
Interesting.

I've tried again with a more recent version (13.1.0-devel (git-9f150ff)), in a IVB desktop.


Seems now it is quite better: shader-runner now takes ~40 seconds.

perf is reporting 45.96% of the time is spent in _mesa_program_resource_find_index.


Giving the improvement, dunno if this should be considered as RESOLVED.
Comment 3 Juan A. Suarez 2016-11-03 15:58:25 UTC
(In reply to Juan A. Suarez from comment #2)
> Interesting.
> 
> I've tried again with a more recent version (13.1.0-devel (git-9f150ff)), in
> a IVB desktop.
>

I've tested with the first shader, not with the faster one.
Comment 4 GitLab Migration User 2019-09-25 18:52:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1454.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.