mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
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:
committed by
Commit Bot service account
parent
d15391e802
commit
9328d94572
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user