[Bug 94129] Mesa's compiler should warn about undefined values
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 24 08:27:20 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=94129
--- Comment #5 from Alejandro Piñeiro (freenode IRC: apinheiro) <apinheiro at igalia.com> ---
(In reply to Timothy Arceri from comment #4)
> 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.
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.
> 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.
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.
> 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.
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.
--
You are receiving this mail because:
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/20160224/81faac47/attachment.html>
More information about the intel-3d-bugs
mailing list