[Bug 99349] Failed to build shader (translation from TGSI)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 26 13:31:12 UTC 2017


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

--- Comment #9 from Gert Wollny <gw.fossdev at gmail.com> ---
It turns out that in r600_shader.c:tgsi_split_constant the constants should be
moved to the GPR range, but for large shaders this is not sufficient, since the
temporary registers used there may be beyond 127 which is the limit for GPRs. 

tgsi_split_constant doesn't move all constants and if an operator uses the same
constant as source more than once, then one of the instances of the constants
is moved to a new address, and this may even be counter productive. 

Now to fix this bug, a partial workaround is in the repo I've given above, the
patch changes the register handling to reserve a few registers in the low range
and moves constants there if necessary. Note, however, that it also contains
additional debugging output. 

However, for the instruction 

 LRP TEMP[0].xyz, CONST[31].wwww, CONST[31].xyzz, TEMP[0].xyzz

check_and_set_bank_swizzle still fails. (This is, by the way, one such case
where 
tgsi_split_constant moves one of the instances of CONST[31] to another place.) 

I will try to correct  tgsi_split_constant to not move the values around if
they are originally from the same source and see whether this fixes the
problem.

-- 
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/20170526/cb7ffcb7/attachment.html>


More information about the dri-devel mailing list