mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
tools: Return position from generated vertex shaders
This is required to generate valid MSL code, and will soon be validated by Tint too. Change-Id: I4c5f5c4ecb1c91131c934de1132217d9f6be1f8e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53420 Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
6b22219798
commit
9fd3befa17
@@ -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() {\n" + code + "}\n"
|
||||
code = "\n[[stage(vertex)]] fn main() -> [[builtin(position)]] vec4<f32> {\n" + code + " return vec4<f32>();}\n"
|
||||
}
|
||||
|
||||
addedStubFunction := false
|
||||
|
||||
Reference in New Issue
Block a user