SPIR-V TextureSampleProjGrad instruction inconsistency

#1

Hi Khronos Team,

My name is Alwyn, a software developer and entrepreneur from South Africa. In recent months I’ve started work on an open source virtual machine for SPIR-V binaries.

During the development process I made extensively use of the LunarG test files, by compiling them to SPIR-V binaries using spir-v.com. Most of the binaries produced by the compiler is exactly according to spec, and no errors are raised by the {Zoclee}™ Shade virtual machine. I am however running into a problem with the TextureSampleProjGrad instruction in the texture.vert test file (attached source and SPIR-V binary). According to the official SPIR-V spec, this instruction is NOT of variable length, and should be a size of 7 words. However, this instruction has a word count of 6 bytes in the binary file.

'm not sure if this inconsistency is due to an error in the specification, a bug in the gslang compiler, or perhaps something I misunderstood about the instruction, and are hoping that I could find more information on this forum on how to resolve this issue.

Thank you in advance,
Alwyn
A huge fan of SPIR-V

#2

spir-v.com is not owned or operated by khronos instead someone in Shanghai owns the domain.

If you want the true reference compiler you can find it in the khronos repo

If that also producer the error you can submit it in their bugtracker under “opengl” or “opengl ES” as appropriate under “glsl reference implementation”

#3

I’ve recompiled the source using the reference compiler in the Khronos repo. It produces the exact same binary (I suspect the website uses the same compiler in the background).

A new report has been created in BugTracker.

Thank you for the quick response and help, it’s much appreciated.