mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
hlsl: Pointer support
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>
This commit is contained in:
committed by
Tint LUCI CQ
parent
c9dc951e9e
commit
06aa88aa97
@@ -1 +1,8 @@
|
||||
SKIP: Failed to generate: error: pointers not supported in HLSL
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
int i = 123;
|
||||
i = 123;
|
||||
i = ((100 + 20) + 3);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
SKIP: error: pointers not supported in HLSL
|
||||
void func(int value, inout int pointer) {
|
||||
pointer = value;
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
int i = 0;
|
||||
i = 123;
|
||||
func(123, i);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
SKIP: error: pointers not supported in HLSL
|
||||
void func(int value, inout int pointer) {
|
||||
pointer = value;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void main() {
|
||||
int i = 123;
|
||||
func(123, i);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user