diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-04-07 13:56:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-07 13:56:01 -0700 |
| commit | ba232e44cbb016a4e7c111b42458394027369c5e (patch) | |
| tree | c7d56cfcc5e4c94d0d82358663d82014904ce854 /source/slang/slang-parameter-binding.cpp | |
| parent | c5db04b8ba72d14d6bf2e20abf9c1b8d8466abc6 (diff) | |
Fix a bug around generic functions using DXR RayQuery (#1309)
The DXR `RayQuery` type is our first generic type defined in the stdlib that is marked as a target intrinsic but does *not* map to a custom `IRType` case. Instead, a reference to `RayQuery<T>` is encoded in the IR as an ordinary `specialize` instruction.
Unfortunately, this doesn't play nice with the current specialization logic, which considered a `specialize` instruction to not represent a "fully specialized" instruction, which then inhibits specialization of generics/functions that use such an instruction.
The fix here was to add more nuanced logic to the check for "fully specialized"-ness, so that it considers a `specialize` to already be fully specialized when the generic it applies to represents a target intrinsic.
I also added a note that the whole notion of "fully specialized"-ness that we use isn't really the right thing for the specialization pass, and how we really ought to use a notion of what is or is not a "value."
This change doesn't include a test because the only way to trigger the issue is using the DXR 1.1 `RayQuery` type, and that type is not supported in current release versions of DXC.
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
0 files changed, 0 insertions, 0 deletions
