wgsl: Deprecate '-> void' on functions

Was removed with:
https://github.com/gpuweb/gpuweb/pull/1460

Bug: tint:677
Change-Id: If08cb450189c6158561051ef6e8f2439c60bc010
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47140
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2021-04-08 14:39:47 +00:00
committed by Commit Bot service account
parent d15391e802
commit 9328d94572
48 changed files with 645 additions and 600 deletions

View File

@@ -199,7 +199,7 @@ type example struct {
func tryCompile(compiler, wd string, e example) error {
code := e.code
if e.functionScope {
code = "\n[[stage(vertex)]] fn main() -> void {\n" + code + "}\n"
code = "\n[[stage(vertex)]] fn main() {\n" + code + "}\n"
}
addedStubFunction := false
@@ -212,7 +212,7 @@ func tryCompile(compiler, wd string, e example) error {
if !addedStubFunction && strings.Contains(err.Error(), "error v-0003") {
// error v-0003: At least one of vertex, fragment or compute shader
// must be present. Add a stub entry point to satisfy the compiler.
code += "\n[[stage(vertex)]] fn main() -> void {}\n"
code += "\n[[stage(vertex)]] fn main() {}\n"
addedStubFunction = true
continue
}