mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 12:21:35 +00:00
Add `transform::InlinePointerLets` - a Transform that moves all usage of function-scope `let` statements of a pointer type into their places of usage. Make the HLSL writer transform pointer parameters to `inout`. Fixed: tint:183 Change-Id: I0a7552fa6cd31c7b7691e64feae3170a81cc6c49 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51281 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com>
12 lines
164 B
HLSL
12 lines
164 B
HLSL
int func(int value, inout int pointer) {
|
|
return (value + pointer);
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
int i = 123;
|
|
const int r = func(i, i);
|
|
return;
|
|
}
|
|
|