summaryrefslogtreecommitdiffstats
path: root/source/slang/reflection.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-11-07 10:22:53 -0800
committerTim Foley <tfoley@nvidia.com>2017-11-07 11:00:02 -0800
commitccea5702442a7a8303e6735a038be86939c1ce7a (patch)
treea892b31bbd5e03296b3e5d4627e2a11613fb1194 /source/slang/reflection.cpp
parented29b2994e99e0531488a0d46ff82348b62b070e (diff)
Emit pointer-type parameters as out params
The IR encodes `out` and `in out` function parameters as pointer types, so the emit logic needs to handle it. We had code to handle translation of pointers types into `out` declarations for function *declarations* but weren't handling it for function *definitions*. This change unifies the logic so that it is shared by function definitions and decalrations. This change does *not* deal with the following issues that need to be addressed sometime soon-ish: - We currently always translate pointers into `out`, even if they should be `in out`. This is obviously wrong. - If/when we eventually have targets that support true pointers (e.g., CUDA, NVIDIA OpenGL, etc.) we'll need a way to tell the difference between an `in` pointer parameter, and an `out` parameter. Both of these issues are meant to be addressed by having a few special cases of pointer types, for the `out` and `in out` cases, and only translating those (not all pointers). We need to plumb those through the IR more completely, but I'm not dealing with that here.
Diffstat (limited to 'source/slang/reflection.cpp')
0 files changed, 0 insertions, 0 deletions