We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
im trying to profile a shader made in Unity and compiled to vulkan.
I had no problems before with opengl but i quite dont understand how to do the same with vulkan module.
Im coping the module to another file and saving as frag.spv
malioc.exe --spirv -c Mali-T760 --fragment C:\XXX\frag.spv
The erro i get is, SPIR-V header not recognized
Unity file look like this;
Disassembly for Fragment:// Module Version 10000// Generated by (magic number): 80006// Id's are bound by 370 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 22 40 361 ExecutionMode 4 OriginUpperLeft Name 22 "vs_TEXCOORD1" Name 40 "vs_TEXCOORD2" Decorate 9 RelaxedPrecision Decorate 12 RelaxedPrecision Decorate 12 DescriptorSet 0 Decorate 12 Binding 2 Decorate 13 RelaxedPrecision Decorate 16 RelaxedPrecision Decorate 16 DescriptorSet 0 Decorate 16 Binding 0 Decorate 17 RelaxedPrecision Decorate 22(vs_TEXCOORD1) Location 0 Decorate 26 RelaxedPrecision...Any ideas?
Hi FranFernandez,
It looks like you are trying to pass in a disassembled SPIR-V file; we don't accept this. Mali Offline Compiler needs either the original high-level language source file (any source format which is accepted by glslangValidator works - it doesn't need to be OpenGL ES source code), or a SPIR-V binary module.HTH, Pete
Ok!
Before i just select opengl in unity and show code, later that code i clean up on pvrshadereditor and paste on mali offline .
I thought doing the same with vulkan in unity.
i will keep previous workflow them.
Thank you!
use glslangValidator, made some modifications and work !