Results 1 to 3 of 3

Thread: SPIR instruction database / spreadsheet

  1. #1
    Junior Member
    Join Date
    Dec 2016
    Posts
    19

    SPIR instruction database / spreadsheet

    Is there a more machine-readable list of SPIR instructions around anywhere?

    If not, I plan to make a spreadsheet so that I can autogenerate code.
    - It'll basically be lines of: Op[NAME], Param1Type, Param1Name, Param1Mode, Param2Type ...
    - Types will be from a manual list, eg: 'SourceLanguage', 'id-def', 'nts' (null-terminated-string), optional-word.
    - Not fussed about the encoded opcode value, as I can get that from the header.

  2. #2
    The SPIR-V registry contains a JSON file that has every opcode and its associated parameters and information about them. The file itself is part of the SPIR-V Headers GitHub repo. Surprisingly, it even has documentation explaining the format

  3. #3
    Junior Member
    Join Date
    Dec 2016
    Posts
    19
    Perfect, thankyou. Sorry I should've figured that out.
    I looked at the list and ignored the JSON - my mistake was assuming that the JSON grammar files were for letting people write SPIR-V in JSON, rather than the JSON actually describing the instruction metadata.

    I guess there's no official instruction categorization hierarchy (apart from the structure of opcode names, like OpType[]).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean