<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:kenneth@whitecape.org" title="Kenneth Graunke <kenneth@whitecape.org>"> <span class="fn">Kenneth Graunke</span></a>
</span> changed
<a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - dEQP-VK.spirv_assembly.instruction.graphics.module.same_module"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109573">bug 109573</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>ASSIGNED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - dEQP-VK.spirv_assembly.instruction.graphics.module.same_module"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109573#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - dEQP-VK.spirv_assembly.instruction.graphics.module.same_module"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109573">bug 109573</a>
from <span class="vcard"><a class="email" href="mailto:kenneth@whitecape.org" title="Kenneth Graunke <kenneth@whitecape.org>"> <span class="fn">Kenneth Graunke</span></a>
</span></b>
<pre>I looked into this for a few hours today, it's unfortunately a bit more
complicated than I'd hoped. My patch is correct, it's just exposing a
pre-existing issue.
That test has a single SPIR-V module containing multiple shader stages. When
compiling that module, we generate shader inputs and outputs for every
stage...in a NIR shader targeting a particular shader stage. So, we suddenly
have VS output variables in a TCS. The TCS expects outputs to be per-vertex
arrays (or marked patch). VS outputs are not. So, they are illegal in a TCS.
In particular, there is a gl_PerVertex output variable for another stage in the
TCS, which is being structure split, giving us top-level output for clipdist[x]
and culldist[x]. But in a TCS, those would need an extra dimension -
dist[x][y]. The validator tries to enforce that variables marked 'compact'
must be arrays, and after unwrapping the per-vertex IO array dimension, it sees
simply 'float', which is rightly illegal.
I'm testing a patch to remove dead input/output variables at the end of
spirv_to_nir(), which should eliminate the invalid ones before the validator
ever sees the shenanigans. Jason recommended this, and we take a similar
approach already in some cases.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>