|
|
This extends the code for handling uninitialized output parameters.
Still needs to handle generic templates and assignment of uninitialized
values more carefully.
The file containing the relevant code are now in
source/slang/slang-ir-use-uninitialized-values.cpp
rather than the previous
source/slang/slang-ir-use-uninitialized-out-param.h
and the top-level function is now checkForUsingUinitializedValues.
Additionally a rudimentary test shader has been added for this case, which replaces the old file for out params only; tests/diagnositcs/uninitialized-out.slang becomes tests/diagnositcs/uninitialized.slang.
What this does not implement (could be future PRs):
* Checking uninitialized fields within constructors
* Partially uninitialized values with respect to data structure (e.g. arrays/structs/vector types)
* Partially uninitialized values with respect to control flow (e.g. if/else/loop)
|