mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-09 10:30:25 +08:00
feat(examples): simplify vadd spv gen (#4)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
f, err := os.Open(os.Args[1])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer f.Close()
|
||||
fo, err := os.Create(os.Args[2])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer fo.Close()
|
||||
scan := bufio.NewScanner(f)
|
||||
for scan.Scan() {
|
||||
t := scan.Text()
|
||||
t = strings.ReplaceAll(t, " spir_func ", " spir_kernel ")
|
||||
t = strings.ReplaceAll(t, "ptr addrspace(4)", "ptr addrspace(1)")
|
||||
fo.WriteString(t)
|
||||
fo.WriteString("\n")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user