Can't load default.vert
tanelxen opened this issue · 2 comments
I cloned repository with LFS, opened package in Xcode 15.2, run TestApp1 and got runtime error:
[DKGame:debug:E8944C00] Notification: name = NSApplicationWillFinishLaunchingNotification, object = Optional(<NSApplication: 0x12861ba50>), userInfo = nil [DKGame:error:E8944C00] SPIRV-Cross: Invalid SPIRV format. [DKGame:error:E8944C00] Shader.compile() error: "Invalid SPIRV format.", spvc_result(rawValue: -1) [DKGame:error:E8944C00] URL(file:///Users/fedor/Library/Developer/Xcode/DerivedData/SwiftVVD-ayyxphwodmnkithitdfowuberhio/Build/Products/Debug/DKGame_DKGUI.bundle/Contents/Resources/SPIRV/default.vert.spv) error: LoadError(message: "Failed to load shader: default.vert") DKGUI/GraphicsContext+Pipeline.swift:452: Fatal error: GraphicsPipelineStates.sharedInstance(commandQueue:) Error: LoadError(message: "Failed to load shader: default.vert")
I've tried on MacBook Pro with M1 and Sonoma 14.5
Some of the shader files seems to be broken.
The shader files are located in the 'Sources/DKGUI/Resources/Shaders/SPIRV' folder.
Please try downloading them again and if you are still having issues, you may want to download the files directly from your web browser and compare them. github files
(check the file hashes if possible, or at least compare the file sizes)
If the shader file is not the problem, it could be a packaging issue in Xcode.
I recommend running it from the terminal directly. In the root folder of this project, run the following command
swift run TestApp1
Oh... I see. Shader files was broken.
I've downloaded again and it works fine. Thank you!