I have written a vertex shader, and compile it to SPIR-V code. Then I load it and create shader module, but it failed. I don’t know why. Can you help me?
Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x26b1f2df968, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: End of input reached while decoding OpAccessChain starting at word 244: missing result ID operand at word offset 2.
Please do not post pictures of code. Also, this is not Twitter; you don’t have character limits. It’s OK to take your time to post a single, complete post. You don’t need to post repeatedly to get all of the information out there.
Lastly, you read the file as text. But it’s a binary file; you should open and read it as binary. And it should be read into a uint32_t array.