<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Mesa's compiler should warn about undefined values"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94129#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Mesa's compiler should warn about undefined values"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94129">bug 94129</a>
from <span class="vcard"><a class="email" href="mailto:apinheiro@igalia.com" title="Alejandro Piņeiro (freenode IRC: apinheiro) <apinheiro@igalia.com>"> <span class="fn">Alejandro Piņeiro (freenode IRC: apinheiro)</span></a>
</span></b>
<pre>(In reply to Timothy Arceri from <a href="show_bug.cgi?id=94129#c4">comment #4</a>)
<span class="quote">> The AST is a bit awkward to work with beyond basic validation. You would
> likely find it easier to add this in GLSL IR somewhere.</span >
Well, ast_to_hir is a kind of "in the middle" between AST and IR, as the
translation between one and the other is being done there.
Additionally, as I mentioned on my comment, ir_variable is already storing if a
variable was assigned (that is mostly equivalent to initialized), but as the
comment documenting it says:
* This answers whether the variable was assigned in any path of
* the shader during ast_to_hir. This doesn't answer whether it is
* still written after dead code removal, nor is it maintained in
* non-ast_to_hir.cpp (GLSL parsing) paths.
So initially I preferred to try to reuse what it was already available.
<span class="quote">> I'm not sure how hard it would be to detect if something is initialized, but
> there are plenty of examples where we walk over the IR and do some type of
> validation/modification, you may even be able to hook into an existing pass.</span >
Ok, I will try this option if Im not able to advance on my current approach.
But as said, I would prefer to try first with what IR already provides.
<span class="quote">> Also do be afraid to send what you have as a RFC to the mailing list for
> feedback and ideas. You will get much more feedback that way rather than
> commenting on a bug.</span >
Yes, that was also my idea, but as mentioned my working patch was still too
dirty for that. I preferred to try to clean it first.
Thanks for all the feedback.</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>