[Bug 101562] Fetching from imageBuffer creates very poor GEN assembly
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jun 23 07:30:47 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101562
Bug ID: 101562
Summary: Fetching from imageBuffer creates very poor GEN
assembly
Product: Mesa
Version: 17.1
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/i965
Assignee: intel-3d-bugs at lists.freedesktop.org
Reporter: kevin.rogovin at intel.com
QA Contact: intel-3d-bugs at lists.freedesktop.org
Created attachment 132153
--> https://bugs.freedesktop.org/attachment.cgi?id=132153&action=edit
tarball of results: .shader.txt is input shader, .asm.txt is outout of
INTEL_DEBUG=fs
If one uses an imageBuffer to fetch values and add them in either of the forms:
value = start_value + get_value(0) + get_value(1) + ...
or
value = ((((((...(start_value + get_value(0)) + get_value(1)) + ... )
then the generated assembly is quite poor. It reserves O(n) registers (where n
is the number of constants to fetch) at shader start, with those values placed
into the registers having a large number of duplicates.
However, if the shader is:
value = start_value;
value += get_value(0);
value += get_value(1);
or if the constants are fetched though other means (UBO, TBO, SSBO) then the
generated assembly is fine. This is in spite of the fact that the above is
equivalent to the 2nd form of a one line add.
Attached is a battery of machine generated shaders and the output of
INTEL_DEBUG=fs when compiling such shaders with a matching, but trivial, vertex
shader.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170623/9460486c/attachment-0001.html>
More information about the intel-3d-bugs
mailing list