game

-- Sample game behavior.  This file contains global functions
-- that are called from the C++ game engine when certain events
-- occur:
--   StartGame
--   StartLevel
--   OnTouchBegan(x, y, tapcount) -- return true to accept touch
--   OnTouchMoved(x, y, tapcount)
--   OnTouchEnded(x, y)
--   OnContactBegan
--   OnContactEnded
--
-- This file should not alter to global namespace.
--
-- As well as arguments recieved this script has access
-- to the global game variables:
--   game_obj - global state, which persists between level and
--              level reloads but is destroyes on game restart
--              or reload.
--   level_obj - stores level specific state which is destroyed
--               on level restart.

local util = require 'util'
local path = require 'path'
local drawing = require 'drawing'
local gui = require 'gui'

local handlers = {}
local MENU_DRAW_ORDER = 3
local FONT_NAME = 'Arial.ttf'
local FONT_SIZE = 32
local VELOCITY_ITERATIONS = 8
local POS_ITERATIONS = 1

--- Menu callback
local function HandleRestart()
    GameManager:sharedManager():Restart()
end

--- Menu callback
local function HandleExit()
    CCDirector:sharedDirector():popScene()
end

--- Menu callback
local function ToggleDebug()
    level_obj.layer:ToggleDebug()
end

local time_since_last_update = 0

local function PositionTimer(timer)
    local visible_size = CCDirector:sharedDirector():getVisibleSize()
    local xpos = game_obj.origin.x + visible_size.width - timer:getContentSize().width / 1.5
    local ypos = game_obj.origin.y + visible_size.height - timer:getContentSize().height / 1.5
    timer:setPosition(ccp(xpos, ypos))
end

--- Game behaviour callback.  Called every frame with the time delta
-- in seconds since the previous frame.
function handlers.Update(delta)
    -- Update box2d world
    level_obj.world:Step(delta, VELOCITY_ITERATIONS, POS_ITERATIONS)

    -- Check for timeout
    local state = level_obj.game_state
    state.time_remaining = state.time_remaining - delta
    if state.time_remaining < 0 then
        LevelComplete()
    end

    -- Render time remaining
    time_since_last_update = time_since_last_update + delta
    if time_since_last_update > 0.5 then
        time_since_last_update = 0
        level_obj.time_display:setString(string.format("%.0f", state.time_remaining))
        PositionTimer(level_obj.time_display)
    end
end

--- Game behaviour callback.  Called when a level is started/restarted.
-- This function sets up level-specific game state, and adds any UI
-- needed for the level.  In this case we add a menu layer to the scene
-- that is drawn on top of the LevelLayer.
function handlers.StartLevel(level_number)
    util.Log('game.lua: StartLevel: ' .. level_number)
    drawing.handlers.OnTouchBegan = drawn_object_handlers

    -- Initialize game state
    level_obj.game_state = {
        goal_reached = false,
        time_remaining = 30,
        stars_collected = { },
    }

    -- Lookup some tags that are used later in the collution code.
    level_obj.ball_tag = level_obj.tag_map['BALL']
    level_obj.goal_tag = level_obj.tag_map['GOAL']
    level_obj.star_tag = level_obj.tag_map['STAR1']

    -- Create a textual menu as a sibling of the LevelLayer
    menu_def = {
        font_size = 24,
        align = 'Left',
        pos = { 10, 300 },
        items = {
            { name='Restart', callback=HandleRestart },
            { name='Exit', callback=HandleExit },
            { name='Toggle Debug', callback=ToggleDebug }
        },
    }

    menu = gui.CreateMenu(menu_def)
    local parent = level_obj.layer:getParent()
    parent:addChild(menu, MENU_DRAW_ORDER)

    -- Create time display
    level_obj.time_display = CCLabelTTF:create("--", FONT_NAME, FONT_SIZE)
    level_obj.layer:addChild(level_obj.time_display)
    PositionTimer(level_obj.time_display)
end

--- Remove a shape that was previously draw by this drawing module.
function drawing.RemoveShape(tag)
    local sprite = level_obj.brush:getChildByTag(tag)
    -- Remove the box2d body
    sprite = tolua.cast(sprite, "CCPhysicsSprite")
    local body = sprite:getB2Body()
    level_obj.world:DestroyBody(body)
    -- Remove the sprite from the brush (its parent)
    level_obj.brush:removeChild(sprite, true)
end

local last_drawn_shape = nil
local last_draw_time = 0

--- Touch handler to use for all dynamic objects
-- This handler will delete the object when it is double clicked
--
local drawn_object_handlers = {}
function drawn_object_handlers.OnTouchBegan(self, x, y, tapcount)
    if tapcount == 2 then
        -- If there was an object created by the first click of this
        -- double click then remove it now.
        if CCTime:getTime() - last_draw_time < 0.400 then
            -- If the receiving object is that last drawn
            -- object then ignore
            if last_drawn_shape:getTag() == self.tag then
                return false
            end
            drawing.RemoveShape(last_drawn_shape:getTag())
            last_drawn_shape = nil
        end

        util.Log('double-click on drawn object: ' .. self.tag_str)
        -- Cancel delayed drawing
        drawing.RemoveShape(self.tag)

        return true
    end
end

--- Forward touch events to default drawing handler.
function handlers.OnTouchBegan(x, y, tapcount)
    if drawing.IsDrawing() then
        return false
    end

    last_draw_time = CCTime:getTime()
    return drawing.OnTouchBegan(x, y, tapcount)
end

--- Forward touch events to default drawing handler.
function handlers.OnTouchMoved(x, y)
    drawing.OnTouchMoved(x, y)
end

--- Forward touch events to default drawing handler.
function handlers.OnTouchEnded(x, y)
    last_drawn_shape = drawing.OnTouchEnded(x, y)
end

--- Called when two tagged objects start colliding (in the box2d world).
--
-- In this game we check for collisions between the 'BALL' and the
-- 'STAR's that can be collects as well as the 'GOAL'.  Objects
-- are identified using tags.  The numeric tag values are looked up
-- and cached when the level first starts.
function handlers.OnContactBegan(object1, object2)
    -- util.Log('game.lua: OnContactBegan')

    -- We are only interested in collisions involving the ball
    if object1.tag == level_obj.ball_tag then
        other = object2
    elseif object2.tag == level_obj.ball_tag then
        other = object1
    else
        return
    end

    local state = level_obj.game_state
    for i=1,level_obj.num_stars do
        local star_tag = level_obj.star_tag + i - 1
        if other.tag == star_tag then
            if state.stars_collected[i] ~= true then
                util.Log('star ' .. i .. ' reached')
                state.stars_collected[i] = true
                local star = level_obj.layer:getChildByTag(star_tag)
                local action = CCFadeOut:create(0.5)
                star:runAction(action);
            end
        end
    end

    if state.goal_reached ~= true then
        if other.tag == level_obj.goal_tag then
            util.Log('goal reached')
            state.goal_reached = true

            local function GoalFadeoutComplete(sender)
                LevelComplete()
            end

            local goal = level_obj.layer:getChildByTag(level_obj.goal_tag)
            local fadeout = CCFadeOut:create(0.5)
            local fadeout_done = CCCallFuncN:create(GoalFadeoutComplete)
            local seq = CCSequence:createWithTwoActions(fadeout, fadeout_done);
            goal:runAction(seq);
        end
    end
end

--- Called when two tagged objects stop colliding (in the box2d world).
function handlers.OnContactEnded(object1, object2)
    -- util.Log('game.lua: OnContactEnded')
end

return handlers


require "lunit"
module("util_test", lunit.testcase, package.seeall)
util = require "util"
test_table = {mylist = { 1, 2, 3 }, foo = 'bar', hello = 123, subtable = { key = 'value' }}
function test_TableToString()
    expected = [[
{
  hello = 123,
  subtable = {
    key = 'value',
  }
  foo = 'bar',
  mylist = {
    1,
    2,
    3,
  }
}
]]
    result = util.TableToString(test_table)
    assert_equal(expected, result)
end
function test_TableToYaml()
    expected = [[
hello: 123
subtable:key: value
foo: bar
mylist:
 - 1
 - 2
 - 3
]]
    result = util.TableToYaml(test_table, nil, nil, true)
    assert_equal(expected, result)
end
function test_TableToYamlOneLine()
    expected = '{ hello: 123, subtable: { key: value }, foo: bar, mylist: [1, 2, 3] }'
    result = util.TableToYamlOneLine(test_table)
    assert_equal(expected, result)
end


require "lunit"
module("validate_test", lunit.testcase, package.seeall)
validate = require "validate"
function test_EmptyGameDef()
    validate.ValidateGameDef('dummygame.def', { })
end
function test_GameDefInvalidKey()
    local function doError()
        validate.ValidateGameDef('dummygame.def', { foo = 1 })
    end
    assert_error("invalid key failed to generate error", doError)
end
function test_LevelDefEmpty()
    validate.ValidateLevelDef('dummylevel.def', { }, { })
end
function test_LevelDefInvalidKey()
    local function doError()
        validate.ValidateLevelDef('dummylevel.def', { }, { foo = 1 })
    end
    assert_error("invalid key failed to generate error", doError)
end


-- A solution contains projects, and defines the available configurations
solution "p7zip"
   configurations { "Debug", "Release" }

-- includes for all projects
      includedirs {
        "../../../myWindows",
        "../../../",
        "../../../include_windows"
      }

      configuration "Debug"
         defines { "DEBUG", "_FILE_OFFSET_BITS=64", "_LARGEFILE_SOURCE", "_REENTRANT", "ENV_UNIX", "BREAK_HANDLER", "UNICODE", "_UNICODE" }
         flags { "Symbols" }

      configuration "Release"
         defines { "NDEBUG", "_FILE_OFFSET_BITS=64", "_LARGEFILE_SOURCE", "_REENTRANT", "ENV_UNIX", "BREAK_HANDLER", "UNICODE", "_UNICODE" }
         flags { "Optimize" }

---------------------------------
   project "all_c_code"
     kind "StaticLib"
      language "C"
      files {
	"../../../../C/Aes.c",
	"../../../../C/7zStream.c",
	"../../../../C/Alloc.c",
	"../../../../C/Bra.c",
	"../../../../C/Bra86.c",
	"../../../../C/BraIA64.c",
	"../../../../C/BwtSort.c",
	"../../../../C/Delta.c",
	"../../../../C/HuffEnc.c",
	"../../../../C/LzFind.c",
	"../../../../C/LzFindMt.c",
	"../../../../C/Lzma2Dec.c",
	"../../../../C/Lzma2Enc.c",
	"../../../../C/LzmaDec.c",
	"../../../../C/LzmaEnc.c",
	"../../../../C/MtCoder.c",
	"../../../../C/Ppmd7.c",
	"../../../../C/Ppmd7Dec.c",
	"../../../../C/Ppmd7Enc.c",
	"../../../../C/Ppmd8.c",
	"../../../../C/Ppmd8Dec.c",
	"../../../../C/Ppmd8Enc.c",
	"../../../../C/Sha256.c",
	"../../../../C/Sort.c",
	"../../../../C/Threads.c",
	"../../../../C/Xz.c",
	"../../../../C/XzCrc64.c",
	"../../../../C/XzDec.c",
	"../../../../C/XzEnc.c",
	"../../../../C/XzIn.c",

	"../../../../C/7zCrc.c",
	"../../../../C/7zCrcOpt.c"
      }

---------------------------------
   project "7za"
      kind "ConsoleApp"
      language "C++"
      files {
	"../../../myWindows/myGetTickCount.cpp",
	"../../../myWindows/wine_date_and_time.cpp",
	"../../../myWindows/myAddExeFlag.cpp",
	"../../../myWindows/mySplitCommandLine.cpp",

	"../../UI/Console/BenchCon.cpp",
	"../../UI/Console/ConsoleClose.cpp",
	"../../UI/Console/ExtractCallbackConsole.cpp",
	"../../UI/Console/List.cpp",
	"../../UI/Console/Main.cpp",
	"../../UI/Console/MainAr.cpp",
	"../../UI/Console/OpenCallbackConsole.cpp",
	"../../UI/Console/PercentPrinter.cpp",
	"../../UI/Console/UpdateCallbackConsole.cpp",
	"../../UI/Console/UserInputUtils.cpp",

	"../../../Common/CommandLineParser.cpp",
	"../../../Common/CRC.cpp",
	"../../../Common/IntToString.cpp",
	"../../../Common/ListFileUtils.cpp",
	"../../../Common/StdInStream.cpp",
	"../../../Common/StdOutStream.cpp",
	"../../../Common/MyString.cpp",
	"../../../Common/MyWindows.cpp",
	"../../../Common/StringConvert.cpp",
	"../../../Common/StringToInt.cpp",
	"../../../Common/UTFConvert.cpp",
	"../../../Common/MyVector.cpp",
	"../../../Common/Wildcard.cpp",

	"../../../Windows/Error.cpp",
	"../../../Windows/FileDir.cpp",
	"../../../Windows/FileFind.cpp",
	"../../../Windows/FileIO.cpp",
	"../../../Windows/FileName.cpp",
	"../../../Windows/PropVariant.cpp",
	"../../../Windows/PropVariantConversions.cpp",
	"../../../Windows/Synchronization.cpp",
	"../../../Windows/System.cpp",
	"../../../Windows/Time.cpp",

	"../../Common/CreateCoder.cpp",
	"../../Common/CWrappers.cpp",
	"../../Common/FilePathAutoRename.cpp",
	"../../Common/FileStreams.cpp",
	"../../Common/FilterCoder.cpp",
	"../../Common/InBuffer.cpp",
	"../../Common/InOutTempBuffer.cpp",
	"../../Common/LimitedStreams.cpp",
	"../../Common/LockedStream.cpp",
	"../../Common/MemBlocks.cpp",
	"../../Common/MethodId.cpp",
	"../../Common/MethodProps.cpp",
	"../../Common/OffsetStream.cpp",
	"../../Common/OutBuffer.cpp",
	"../../Common/OutMemStream.cpp",
	"../../Common/ProgressMt.cpp",
	"../../Common/ProgressUtils.cpp",
	"../../Common/StreamBinder.cpp",
	"../../Common/StreamObjects.cpp",
	"../../Common/StreamUtils.cpp",
	"../../Common/VirtThread.cpp",

	"../../UI/Common/ArchiveCommandLine.cpp",
	"../../UI/Common/ArchiveExtractCallback.cpp",
	"../../UI/Common/ArchiveOpenCallback.cpp",
	"../../UI/Common/Bench.cpp",
	"../../UI/Common/DefaultName.cpp",
	"../../UI/Common/EnumDirItems.cpp",
	"../../UI/Common/Extract.cpp",
	"../../UI/Common/ExtractingFilePath.cpp",
	"../../UI/Common/LoadCodecs.cpp",
	"../../UI/Common/OpenArchive.cpp",
	"../../UI/Common/PropIDUtils.cpp",
	"../../UI/Common/SetProperties.cpp",
	"../../UI/Common/SortUtils.cpp",
	"../../UI/Common/TempFiles.cpp",
	"../../UI/Common/Update.cpp",
	"../../UI/Common/UpdateAction.cpp",
	"../../UI/Common/UpdateCallback.cpp",
	"../../UI/Common/UpdatePair.cpp",
	"../../UI/Common/UpdateProduce.cpp",

	"../../Archive/Bz2Handler.cpp",
	"../../Archive/DeflateProps.cpp",
	"../../Archive/GzHandler.cpp",
	"../../Archive/LzmaHandler.cpp",
	"../../Archive/PpmdHandler.cpp",
	"../../Archive/SplitHandler.cpp",
	"../../Archive/XzHandler.cpp",
	"../../Archive/ZHandler.cpp",

	"../../Archive/Common/CoderMixer2.cpp",
	"../../Archive/Common/CoderMixer2MT.cpp",
	"../../Archive/Common/CrossThreadProgress.cpp",
	"../../Archive/Common/DummyOutStream.cpp",
	"../../Archive/Common/FindSignature.cpp",
	"../../Archive/Common/HandlerOut.cpp",
	"../../Archive/Common/InStreamWithCRC.cpp",
	"../../Archive/Common/ItemNameUtils.cpp",
	"../../Archive/Common/MultiStream.cpp",
	"../../Archive/Common/OutStreamWithCRC.cpp",
	"../../Archive/Common/ParseProperties.cpp",

	"../../Archive/7z/7zCompressionMode.cpp",
	"../../Archive/7z/7zDecode.cpp",
	"../../Archive/7z/7zEncode.cpp",
	"../../Archive/7z/7zExtract.cpp",
	"../../Archive/7z/7zFolderInStream.cpp",
	"../../Archive/7z/7zFolderOutStream.cpp",
	"../../Archive/7z/7zHandler.cpp",
	"../../Archive/7z/7zHandlerOut.cpp",
	"../../Archive/7z/7zHeader.cpp",
	"../../Archive/7z/7zIn.cpp",
	"../../Archive/7z/7zOut.cpp",
	"../../Archive/7z/7zProperties.cpp",
	"../../Archive/7z/7zSpecStream.cpp",
	"../../Archive/7z/7zUpdate.cpp",
	"../../Archive/7z/7zRegister.cpp",

	"../../Archive/Cab/CabBlockInStream.cpp",
	"../../Archive/Cab/CabHandler.cpp",
	"../../Archive/Cab/CabHeader.cpp",
	"../../Archive/Cab/CabIn.cpp",
	"../../Archive/Cab/CabRegister.cpp",

	"../../Archive/Tar/TarHandler.cpp",
	"../../Archive/Tar/TarHandlerOut.cpp",
	"../../Archive/Tar/TarHeader.cpp",
	"../../Archive/Tar/TarIn.cpp",
	"../../Archive/Tar/TarOut.cpp",
	"../../Archive/Tar/TarRegister.cpp",
	"../../Archive/Tar/TarUpdate.cpp",

	"../../Archive/Zip/ZipAddCommon.cpp",
	"../../Archive/Zip/ZipHandler.cpp",
	"../../Archive/Zip/ZipHandlerOut.cpp",
	"../../Archive/Zip/ZipHeader.cpp",
	"../../Archive/Zip/ZipIn.cpp",
	"../../Archive/Zip/ZipItem.cpp",
	"../../Archive/Zip/ZipOut.cpp",
	"../../Archive/Zip/ZipUpdate.cpp",
	"../../Archive/Zip/ZipRegister.cpp",

	"../../Compress/Bcj2Coder.cpp",
	"../../Compress/Bcj2Register.cpp",
	"../../Compress/BcjCoder.cpp",
	"../../Compress/BcjRegister.cpp",
	"../../Compress/BitlDecoder.cpp",
	"../../Compress/BranchCoder.cpp",
	"../../Compress/BranchMisc.cpp",
	"../../Compress/BranchRegister.cpp",
	"../../Compress/ByteSwap.cpp",
	"../../Compress/BZip2Crc.cpp",
	"../../Compress/BZip2Decoder.cpp",
	"../../Compress/BZip2Encoder.cpp",
	"../../Compress/BZip2Register.cpp",
	"../../Compress/CopyCoder.cpp",
	"../../Compress/CopyRegister.cpp",
	"../../Compress/Deflate64Register.cpp",
	"../../Compress/DeflateDecoder.cpp",
	"../../Compress/DeflateEncoder.cpp",
	"../../Compress/DeflateRegister.cpp",
	"../../Compress/DeltaFilter.cpp",
	"../../Compress/ImplodeDecoder.cpp",
	"../../Compress/ImplodeHuffmanDecoder.cpp",
	"../../Compress/Lzma2Decoder.cpp",
	"../../Compress/Lzma2Encoder.cpp",
	"../../Compress/Lzma2Register.cpp",
	"../../Compress/LzmaDecoder.cpp",
	"../../Compress/LzmaEncoder.cpp",
	"../../Compress/LzmaRegister.cpp",
	"../../Compress/LzOutWindow.cpp",
	"../../Compress/Lzx86Converter.cpp",
	"../../Compress/LzxDecoder.cpp",
	"../../Compress/PpmdDecoder.cpp",
	"../../Compress/PpmdEncoder.cpp",
	"../../Compress/PpmdRegister.cpp",
	"../../Compress/PpmdZip.cpp",
	"../../Compress/QuantumDecoder.cpp",
	"../../Compress/ShrinkDecoder.cpp",
	"../../Compress/ZDecoder.cpp",

	"../../Crypto/7zAes.cpp",
	"../../Crypto/7zAesRegister.cpp",
	"../../Crypto/HmacSha1.cpp",
	"../../Crypto/MyAes.cpp",
	"../../Crypto/Pbkdf2HmacSha1.cpp",
	"../../Crypto/RandGen.cpp",
	"../../Crypto/Sha1.cpp",
	"../../Crypto/WzAes.cpp",
	"../../Crypto/ZipCrypto.cpp",
	"../../Crypto/ZipStrong.cpp"

      }

      configuration "linux"
	links       {  "all_c_code", "pthread" }


-- Box2D premake script.
-- http://industriousone.com/premake

local action = _ACTION or ""

solution "Box2D"
	location ( "Build/" .. action )
	configurations { "Debug", "Release" }

	configuration "vs*"
		defines { "_CRT_SECURE_NO_WARNINGS" }

	configuration "Debug"
		targetdir ( "Build/" .. action .. "/bin/Debug" )
		flags { "Symbols" }

   configuration "Release"
		targetdir ( "Build/" .. action .. "/bin/Release" )
		defines { "NDEBUG" }
		flags { "Optimize" }

	project "Box2D"
		kind "StaticLib"
		language "C++"
		files { "Box2D/**.h", "Box2D/**.cpp" }
		vpaths { [""] = "Box2D" }
		includedirs { "." }

	if os.get == "windows" then
		project "FreeGLUT"
			kind "StaticLib"
			language "C"
			files { "freeglut/*.h", "freeglut/*.c" }
			vpaths { ["Headers"] = "**.h",  ["Sources"] = "**.c" }
	end

	project "GLUI"
		kind "StaticLib"
		language "C++"
		files { "glui/*.h", "glui/*.cpp" }
		vpaths { ["Headers"] = "**.h",  ["Sources"] = "**.cpp" }
		includedirs { "." }
		configuration { "windows" }
			 buildoptions { "/W1" }

	project "HelloWorld"
		kind "ConsoleApp"
		language "C++"
		files { "HelloWorld/Helloworld.cpp" }
		vpaths { [""] = "HelloWorld" }
		includedirs { "." }
		links { "Box2D" }

	project "Testbed"
		kind "ConsoleApp"
		language "C++"
		files { "Testbed/**.h", "Testbed/**.cpp" }
		vpaths { [""] = "Testbed" }
		includedirs { "." }
		links { "Box2D", "GLUI" }
		configuration { "windows" }
			links { "FreeGLUT", "glu32", "opengl32", "winmm" }
		configuration { "macosx" }
			linkoptions { "-framework OpenGL -framework GLUT" }
		configuration { "not windows", "not macosx" }
			links { "X11", "GL", "GLU", "GLUT" }


scimark

------------------------------------------------------------------------------
-- Lua SciMark (2010-12-20).
--
-- A literal translation of SciMark 2.0a, written in Java and C.
-- Credits go to the original authors Roldan Pozo and Bruce Miller.
-- See: http://math.nist.gov/scimark2/
------------------------------------------------------------------------------
local SCIMARK_VERSION = "2010-12-10"
local MIN_TIME = 0.8
local RANDOM_SEED = 101009 -- Must be odd.
local SIZE_SELECT = "small"
local benchmarks = {
  "FFT", "SOR", "MC", "SPARSE", "LU",
  small = {
    FFT		= { 1024 },
    SOR		= { 100 },
    MC		= { },
    SPARSE	= { 1000, 5000 },
    LU		= { 100 },
  },
  large = {
    FFT		= { 1048576 },
    SOR		= { 1000 },
    MC		= { },
    SPARSE	= { 100000, 1000000 },
    LU		= { 1000 },
  },
}
local abs, log, sin, floor = math.abs, math.log, math.sin, math.floor
local pi, clock = math.pi, os.clock
local format = string.format
------------------------------------------------------------------------------
-- Select array type: Lua tables or native (FFI) arrays
------------------------------------------------------------------------------
local darray, iarray
local function array_init()
  if jit and jit.status and jit.status() then
    local ok, ffi = pcall(require, "ffi")
    if ok then
      darray = ffi.typeof("double[?]")
      iarray = ffi.typeof("int[?]")
      return
    end
  end
  function darray(n) return {} end
  iarray = darray
end
------------------------------------------------------------------------------
-- This is a Lagged Fibonacci Pseudo-random Number Generator with
-- j, k, M = 5, 17, 31. Pretty weak, but same as C/Java SciMark.
------------------------------------------------------------------------------
local rand, rand_init
if jit and jit.status and jit.status() then
  -- LJ2 has bit operations and zero-based arrays (internally).
  local bit = require("bit")
  local band, sar = bit.band, bit.arshift
  function rand_init(seed)
    local Rm, Rj, Ri = iarray(17), 16, 11
    for i=0,16 do Rm[i] = 0 end
    for i=16,0,-1 do
      seed = band(seed*9069, 0x7fffffff)
      Rm[i] = seed
    end
    function rand()
      local i = band(Ri+1, sar(Ri-16, 31))
      local j = band(Rj+1, sar(Rj-16, 31))
      Ri, Rj = i, j
      local k = band(Rm[i] - Rm[j], 0x7fffffff)
      Rm[j] = k
      return k * (1.0/2147483647.0)
    end
  end
else
  -- Better for standard Lua with one-based arrays and without bit operations.
  function rand_init(seed)
    local Rm, Rj = {}, 1
    for i=1,17 do Rm[i] = 0 end
    for i=17,1,-1 do
      seed = (seed*9069) % (2^31)
      Rm[i] = seed
    end
    function rand()
      local j, m = Rj, Rm
      local h = j - 5
      if h < 1 then h = h + 17 end
      local k = m[h] - m[j]
      if k < 0 then k = k + 2147483647 end
      m[j] = k
      if j < 17 then Rj = j + 1 else Rj = 1 end
      return k * (1.0/2147483647.0)
    end
  end
end
local function random_vector(n)
  local v = darray(n+1)
  for x=1,n do v[x] = rand() end
  return v
end
local function random_matrix(m, n)
  local a = {}
  for y=1,m do
    local v = darray(n+1)
    a[y] = v
    for x=1,n do v[x] = rand() end
  end
  return a
end
------------------------------------------------------------------------------
-- FFT: Fast Fourier Transform.
------------------------------------------------------------------------------
local function fft_bitreverse(v, n)
  local j = 0
  for i=0,2*n-4,2 do
    if i < j then
      v[i+1], v[i+2], v[j+1], v[j+2] = v[j+1], v[j+2], v[i+1], v[i+2]
    end
    local k = n
    while k <= j do j = j - k; k = k / 2 end
    j = j + k
  end
end
local function fft_transform(v, n, dir)
  if n <= 1 then return end
  fft_bitreverse(v, n)
  local dual = 1
  repeat
    local dual2 = 2*dual
    for i=1,2*n-1,2*dual2 do
      local j = i+dual2
      local ir, ii = v[i], v[i+1]
      local jr, ji = v[j], v[j+1]
      v[j], v[j+1] = ir - jr, ii - ji
      v[i], v[i+1] = ir + jr, ii + ji
    end
    local theta = dir * pi / dual
    local s, s2 = sin(theta), 2.0 * sin(theta * 0.5)^2
    local wr, wi = 1.0, 0.0
    for a=3,dual2-1,2 do
      wr, wi = wr - s*wi - s2*wr, wi + s*wr - s2*wi
      for i=a,a+2*(n-dual2),2*dual2 do
	local j = i+dual2
	local jr, ji = v[j], v[j+1]
	local dr, di = wr*jr - wi*ji, wr*ji + wi*jr
	local ir, ii = v[i], v[i+1]
	v[j], v[j+1] = ir - dr, ii - di
	v[i], v[i+1] = ir + dr, ii + di
      end
    end
    dual = dual2
  until dual >= n
end
function benchmarks.FFT(n)
  local l2n = log(n)/log(2)
  if l2n % 1 ~= 0 then
    io.stderr:write("Error: FFT data length is not a power of 2\n")
    os.exit(1)
  end
  local v = random_vector(n*2)
  return function(cycles)
    local norm = 1.0 / n
    for p=1,cycles do
      fft_transform(v, n, -1)
      fft_transform(v, n, 1)
      for i=1,n*2 do v[i] = v[i] * norm end
    end
    return ((5*n-2)*l2n + 2*(n+1)) * cycles
  end
end
------------------------------------------------------------------------------
-- SOR: Jacobi Successive Over-Relaxation.
------------------------------------------------------------------------------
local function sor_run(mat, m, n, cycles, omega)
  local om4, om1 = omega*0.25, 1.0-omega
  m = m - 1
  n = n - 1
  for i=1,cycles do
    for y=2,m do
      local v, vp, vn = mat[y], mat[y-1], mat[y+1]
      for x=2,n do
	v[x] = om4*((vp[x]+vn[x])+(v[x-1]+v[x+1])) + om1*v[x]
      end
    end
  end
end
function benchmarks.SOR(n)
  local mat = random_matrix(n, n)
  return function(cycles)
    sor_run(mat, n, n, cycles, 1.25)
    return (n-1)*(n-1)*cycles*6
  end
end
------------------------------------------------------------------------------
-- MC: Monte Carlo Integration.
------------------------------------------------------------------------------
local function mc_integrate(cycles)
  local under_curve = 0
  local rand = rand
  for i=1,cycles do
    local x = rand()
    local y = rand()
    if x*x + y*y <= 1.0 then under_curve = under_curve + 1 end
  end
  return (under_curve/cycles) * 4
end
function benchmarks.MC()
  return function(cycles)
    local res = mc_integrate(cycles)
    assert(math.sqrt(cycles)*math.abs(res-math.pi) < 5.0, "bad MC result")
    return cycles * 4 -- Way off, but same as SciMark in C/Java.
  end
end
------------------------------------------------------------------------------
-- Sparse Matrix Multiplication.
------------------------------------------------------------------------------
local function sparse_mult(n, cycles, vy, val, row, col, vx)
  for p=1,cycles do
    for r=1,n do
      local sum = 0
      for i=row[r],row[r+1]-1 do sum = sum + vx[col[i]] * val[i] end
      vy[r] = sum
    end
  end
end
function benchmarks.SPARSE(n, nz)
  local nr = floor(nz/n)
  local anz = nr*n
  local vx = random_vector(n)
  local val = random_vector(anz)
  local vy, col, row = darray(n+1), iarray(nz+1), iarray(n+2)
  row[1] = 1
  for r=1,n do
    local step = floor(r/nr)
    if step < 1 then step = 1 end
    local rr = row[r]
    row[r+1] = rr+nr
    for i=0,nr-1 do col[rr+i] = 1+i*step end
  end
  return function(cycles)
    sparse_mult(n, cycles, vy, val, row, col, vx)
    return anz*cycles*2
  end
end
------------------------------------------------------------------------------
-- LU: Dense Matrix Factorization.
------------------------------------------------------------------------------
local function lu_factor(a, pivot, m, n)
  local min_m_n = m < n and m or n
  for j=1,min_m_n do
    local jp, t = j, abs(a[j][j])
    for i=j+1,m do
      local ab = abs(a[i][j])
      if ab > t then
	jp = i
	t = ab
      end
    end
    pivot[j] = jp
    if a[jp][j] == 0 then error("zero pivot") end
    if jp ~= j then a[j], a[jp] = a[jp], a[j] end
    if j < m then
      local recp = 1.0 / a[j][j]
      for k=j+1,m do
	local v = a[k]
	v[j] = v[j] * recp
      end
    end
    if j < min_m_n then
      for i=j+1,m do
	local vi, vj = a[i], a[j]
	local eij = vi[j]
	for k=j+1,n do vi[k] = vi[k] - eij * vj[k] end
      end
    end
  end
end
local function matrix_alloc(m, n)
  local a = {}
  for y=1,m do a[y] = darray(n+1) end
  return a
end
local function matrix_copy(dst, src, m, n)
  for y=1,m do
    local vd, vs = dst[y], src[y]
    for x=1,n do vd[x] = vs[x] end
  end
end
function benchmarks.LU(n)
  local mat = random_matrix(n, n)
  local tmp = matrix_alloc(n, n)
  local pivot = iarray(n+1)
  return function(cycles)
    for i=1,cycles do
      matrix_copy(tmp, mat, n, n)
      lu_factor(tmp, pivot, n, n)
    end
    return 2.0/3.0*n*n*n*cycles
  end
end
------------------------------------------------------------------------------
-- Main program.
------------------------------------------------------------------------------
local function printf(...)
  io.write(format(...))
end
local function fmtparams(p1, p2)
  if p2 then return format("[%d, %d]", p1, p2)
  elseif p1 then return format("[%d]", p1) end
  return ""
end
local function measure(min_time, name, ...)
  array_init()
  rand_init(RANDOM_SEED)
  local run = benchmarks[name](...)
  local cycles = 1
  repeat
    local tm = clock()
    local flops = run(cycles, ...)
    tm = clock() - tm
    if tm >= min_time then
      local res = flops / tm * 1.0e-6
      local p1, p2 = ...
      printf("%-7s %8.2f  %s\n", name, res, fmtparams(...))
      return res
    end
    cycles = cycles * 2
  until false
end
--printf("Lua SciMark %s based on SciMark 2.0a. %s.\n\n",
--while arg and arg[1] do
--  local a = table.remove(arg, 1)
--  if a == "-noffi" then
--    package.preload.ffi = nil
--  elseif a == "-small" then
--    SIZE_SELECT = "small"
--  elseif a == "-large" then
--    SIZE_SELECT = "large"
--  elseif benchmarks[a] then
--    local p = benchmarks[SIZE_SELECT][a]
--    measure(MIN_TIME, a, tonumber(arg[1]) or p[1], tonumber(arg[2]) or p[2])
--    return
--  else
--    printf("Usage: scimark [-noffi] [-small|-large] [BENCH params...]\n\n")
--    printf("BENCH   -small         -large\n")
--    printf("---------------------------------------\n")
--    for _,name in ipairs(benchmarks) do
--      printf("%-7s %-13s %s\n", name,
--	     fmtparams(unpack(benchmarks.small[name])),
--	     fmtparams(unpack(benchmarks.large[name])))
--    end
--    printf("\n")
--    os.exit(1)
--  end
--end
local params = benchmarks[SIZE_SELECT]
local sum = 0
for _,name in ipairs(benchmarks) do
  sum = sum + measure(MIN_TIME, name, unpack(params[name]))
end
printf("\nSciMark %8.2f  [%s problem sizes]\n", sum / #benchmarks, SIZE_SELECT)
io.flush()


binarytrees

-- The Computer Language Benchmarks Game
-- http://benchmarksgame.alioth.debian.org/
-- contributed by Mike Pall

local function BottomUpTree(item, depth)
  if depth > 0 then
    local i = item + item
    depth = depth - 1
    local left, right = BottomUpTree(i-1, depth), BottomUpTree(i, depth)
    return { item, left, right }
  else
    return { item }
  end
end

local function ItemCheck(tree)
  if tree[2] then
    return tree[1] + ItemCheck(tree[2]) - ItemCheck(tree[3])
  else
    return tree[1]
  end
end

-- we don't look at commandline arguments anyhow
local N = 4

if N == 0 then
  N = 0
elseif N == 1 then
  N = 9.5
elseif N == 2 then
  N = 11.99
elseif N == 3 then
  N = 12.85
elseif N == 4 then
  N = 14.72
elseif N == 5 then
  N = 15.82
end

local mindepth = 4
local maxdepth = mindepth + 2
if maxdepth < N then maxdepth = N end

do
  local stretchdepth = maxdepth + 1
  local stretchtree = BottomUpTree(0, stretchdepth)
  io.write(string.format("stretch tree of depth %d\t check: %d\n",
    stretchdepth, ItemCheck(stretchtree)))
end

local longlivedtree = BottomUpTree(0, maxdepth)

for depth=mindepth,maxdepth,2 do
  local iterations = 2 ^ (maxdepth - depth + mindepth)
  local check = 0
  for i=1,iterations do
    check = check + ItemCheck(BottomUpTree(1, depth)) +
            ItemCheck(BottomUpTree(-1, depth))
  end
  io.write(string.format("%d\t trees of depth %d\t check: %d\n",
    iterations*2, depth, check))
end

io.write(string.format("long lived tree of depth %d\t check: %d\n",
  maxdepth, ItemCheck(longlivedtree)))


return require(this.dirname..'g3doc/g3doc.lua')


return {
  theme = {
    -- We don't want to have more than h3 headings in the Table Of Content.
    toc_level = 3,
  },
  site = {
    name = 'WebRTC C++ library',
    home = this.dirname..'index.md',
    logo = this.dirname..'logo.svg',
    map  = this.dirname..'sitemap.md',
    -- Ensure absolute links are rewritten correctly.
    root = this.dirname..'..'
  },
  visibility = { '/...' },
  freshness = {}
}


config = super()

config.freshness.owner = 'titovartem'

return config


spirv

-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
-- IN THE MATERIALS.
-- This header is automatically generated by the same tool that creates
-- the Binary Section of the SPIR-V specification.
-- Enumeration tokens for SPIR-V, in various styles:
--   C, C++, C++11, JSON, Lua, Python
--
-- - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
-- - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
-- - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
-- - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
-- - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
--
-- Some tokens act like mask values, which can be OR'd together,
-- while others are mutually exclusive.  The mask-like ones have
-- "Mask" in their name, and a parallel enum that has the shift
-- amount (1 << x) for each corresponding enumerant.
spv = {
    MagicNumber = 0x07230203,
    Version = 0x00010300,
    Revision = 1,
    OpCodeMask = 0xffff,
    WordCountShift = 16,
    SourceLanguage = {
        Unknown = 0,
        ESSL = 1,
        GLSL = 2,
        OpenCL_C = 3,
        OpenCL_CPP = 4,
        HLSL = 5,
    },
    ExecutionModel = {
        Vertex = 0,
        TessellationControl = 1,
        TessellationEvaluation = 2,
        Geometry = 3,
        Fragment = 4,
        GLCompute = 5,
        Kernel = 6,
    },
    AddressingModel = {
        Logical = 0,
        Physical32 = 1,
        Physical64 = 2,
    },
    MemoryModel = {
        Simple = 0,
        GLSL450 = 1,
        OpenCL = 2,
    },
    ExecutionMode = {
        Invocations = 0,
        SpacingEqual = 1,
        SpacingFractionalEven = 2,
        SpacingFractionalOdd = 3,
        VertexOrderCw = 4,
        VertexOrderCcw = 5,
        PixelCenterInteger = 6,
        OriginUpperLeft = 7,
        OriginLowerLeft = 8,
        EarlyFragmentTests = 9,
        PointMode = 10,
        Xfb = 11,
        DepthReplacing = 12,
        DepthGreater = 14,
        DepthLess = 15,
        DepthUnchanged = 16,
        LocalSize = 17,
        LocalSizeHint = 18,
        InputPoints = 19,
        InputLines = 20,
        InputLinesAdjacency = 21,
        Triangles = 22,
        InputTrianglesAdjacency = 23,
        Quads = 24,
        Isolines = 25,
        OutputVertices = 26,
        OutputPoints = 27,
        OutputLineStrip = 28,
        OutputTriangleStrip = 29,
        VecTypeHint = 30,
        ContractionOff = 31,
        Initializer = 33,
        Finalizer = 34,
        SubgroupSize = 35,
        SubgroupsPerWorkgroup = 36,
        SubgroupsPerWorkgroupId = 37,
        LocalSizeId = 38,
        LocalSizeHintId = 39,
        PostDepthCoverage = 4446,
        StencilRefReplacingEXT = 5027,
    },
    StorageClass = {
        UniformConstant = 0,
        Input = 1,
        Uniform = 2,
        Output = 3,
        Workgroup = 4,
        CrossWorkgroup = 5,
        Private = 6,
        Function = 7,
        Generic = 8,
        PushConstant = 9,
        AtomicCounter = 10,
        Image = 11,
        StorageBuffer = 12,
    },
    Dim = {
        Dim1D = 0,
        Dim2D = 1,
        Dim3D = 2,
        Cube = 3,
        Rect = 4,
        Buffer = 5,
        SubpassData = 6,
    },
    SamplerAddressingMode = {
        None = 0,
        ClampToEdge = 1,
        Clamp = 2,
        Repeat = 3,
        RepeatMirrored = 4,
    },
    SamplerFilterMode = {
        Nearest = 0,
        Linear = 1,
    },
    ImageFormat = {
        Unknown = 0,
        Rgba32f = 1,
        Rgba16f = 2,
        R32f = 3,
        Rgba8 = 4,
        Rgba8Snorm = 5,
        Rg32f = 6,
        Rg16f = 7,
        R11fG11fB10f = 8,
        R16f = 9,
        Rgba16 = 10,
        Rgb10A2 = 11,
        Rg16 = 12,
        Rg8 = 13,
        R16 = 14,
        R8 = 15,
        Rgba16Snorm = 16,
        Rg16Snorm = 17,
        Rg8Snorm = 18,
        R16Snorm = 19,
        R8Snorm = 20,
        Rgba32i = 21,
        Rgba16i = 22,
        Rgba8i = 23,
        R32i = 24,
        Rg32i = 25,
        Rg16i = 26,
        Rg8i = 27,
        R16i = 28,
        R8i = 29,
        Rgba32ui = 30,
        Rgba16ui = 31,
        Rgba8ui = 32,
        R32ui = 33,
        Rgb10a2ui = 34,
        Rg32ui = 35,
        Rg16ui = 36,
        Rg8ui = 37,
        R16ui = 38,
        R8ui = 39,
    },
    ImageChannelOrder = {
        R = 0,
        A = 1,
        RG = 2,
        RA = 3,
        RGB = 4,
        RGBA = 5,
        BGRA = 6,
        ARGB = 7,
        Intensity = 8,
        Luminance = 9,
        Rx = 10,
        RGx = 11,
        RGBx = 12,
        Depth = 13,
        DepthStencil = 14,
        sRGB = 15,
        sRGBx = 16,
        sRGBA = 17,
        sBGRA = 18,
        ABGR = 19,
    },
    ImageChannelDataType = {
        SnormInt8 = 0,
        SnormInt16 = 1,
        UnormInt8 = 2,
        UnormInt16 = 3,
        UnormShort565 = 4,
        UnormShort555 = 5,
        UnormInt101010 = 6,
        SignedInt8 = 7,
        SignedInt16 = 8,
        SignedInt32 = 9,
        UnsignedInt8 = 10,
        UnsignedInt16 = 11,
        UnsignedInt32 = 12,
        HalfFloat = 13,
        Float = 14,
        UnormInt24 = 15,
        UnormInt101010_2 = 16,
    },
    ImageOperandsShift = {
        Bias = 0,
        Lod = 1,
        Grad = 2,
        ConstOffset = 3,
        Offset = 4,
        ConstOffsets = 5,
        Sample = 6,
        MinLod = 7,
    },
    ImageOperandsMask = {
        MaskNone = 0,
        Bias = 0x00000001,
        Lod = 0x00000002,
        Grad = 0x00000004,
        ConstOffset = 0x00000008,
        Offset = 0x00000010,
        ConstOffsets = 0x00000020,
        Sample = 0x00000040,
        MinLod = 0x00000080,
    },
    FPFastMathModeShift = {
        NotNaN = 0,
        NotInf = 1,
        NSZ = 2,
        AllowRecip = 3,
        Fast = 4,
    },
    FPFastMathModeMask = {
        MaskNone = 0,
        NotNaN = 0x00000001,
        NotInf = 0x00000002,
        NSZ = 0x00000004,
        AllowRecip = 0x00000008,
        Fast = 0x00000010,
    },
    FPRoundingMode = {
        RTE = 0,
        RTZ = 1,
        RTP = 2,
        RTN = 3,
    },
    LinkageType = {
        Export = 0,
        Import = 1,
    },
    AccessQualifier = {
        ReadOnly = 0,
        WriteOnly = 1,
        ReadWrite = 2,
    },
    FunctionParameterAttribute = {
        Zext = 0,
        Sext = 1,
        ByVal = 2,
        Sret = 3,
        NoAlias = 4,
        NoCapture = 5,
        NoWrite = 6,
        NoReadWrite = 7,
    },
    Decoration = {
        RelaxedPrecision = 0,
        SpecId = 1,
        Block = 2,
        BufferBlock = 3,
        RowMajor = 4,
        ColMajor = 5,
        ArrayStride = 6,
        MatrixStride = 7,
        GLSLShared = 8,
        GLSLPacked = 9,
        CPacked = 10,
        BuiltIn = 11,
        NoPerspective = 13,
        Flat = 14,
        Patch = 15,
        Centroid = 16,
        Sample = 17,
        Invariant = 18,
        Restrict = 19,
        Aliased = 20,
        Volatile = 21,
        Constant = 22,
        Coherent = 23,
        NonWritable = 24,
        NonReadable = 25,
        Uniform = 26,
        SaturatedConversion = 28,
        Stream = 29,
        Location = 30,
        Component = 31,
        Index = 32,
        Binding = 33,
        DescriptorSet = 34,
        Offset = 35,
        XfbBuffer = 36,
        XfbStride = 37,
        FuncParamAttr = 38,
        FPRoundingMode = 39,
        FPFastMathMode = 40,
        LinkageAttributes = 41,
        NoContraction = 42,
        InputAttachmentIndex = 43,
        Alignment = 44,
        MaxByteOffset = 45,
        AlignmentId = 46,
        MaxByteOffsetId = 47,
        ExplicitInterpAMD = 4999,
        OverrideCoverageNV = 5248,
        PassthroughNV = 5250,
        ViewportRelativeNV = 5252,
        SecondaryViewportRelativeNV = 5256,
        NonUniformEXT = 5300,
        HlslCounterBufferGOOGLE = 5634,
        HlslSemanticGOOGLE = 5635,
    },
    BuiltIn = {
        Position = 0,
        PointSize = 1,
        ClipDistance = 3,
        CullDistance = 4,
        VertexId = 5,
        InstanceId = 6,
        PrimitiveId = 7,
        InvocationId = 8,
        Layer = 9,
        ViewportIndex = 10,
        TessLevelOuter = 11,
        TessLevelInner = 12,
        TessCoord = 13,
        PatchVertices = 14,
        FragCoord = 15,
        PointCoord = 16,
        FrontFacing = 17,
        SampleId = 18,
        SamplePosition = 19,
        SampleMask = 20,
        FragDepth = 22,
        HelperInvocation = 23,
        NumWorkgroups = 24,
        WorkgroupSize = 25,
        WorkgroupId = 26,
        LocalInvocationId = 27,
        GlobalInvocationId = 28,
        LocalInvocationIndex = 29,
        WorkDim = 30,
        GlobalSize = 31,
        EnqueuedWorkgroupSize = 32,
        GlobalOffset = 33,
        GlobalLinearId = 34,
        SubgroupSize = 36,
        SubgroupMaxSize = 37,
        NumSubgroups = 38,
        NumEnqueuedSubgroups = 39,
        SubgroupId = 40,
        SubgroupLocalInvocationId = 41,
        VertexIndex = 42,
        InstanceIndex = 43,
        SubgroupEqMask = 4416,
        SubgroupEqMaskKHR = 4416,
        SubgroupGeMask = 4417,
        SubgroupGeMaskKHR = 4417,
        SubgroupGtMask = 4418,
        SubgroupGtMaskKHR = 4418,
        SubgroupLeMask = 4419,
        SubgroupLeMaskKHR = 4419,
        SubgroupLtMask = 4420,
        SubgroupLtMaskKHR = 4420,
        BaseVertex = 4424,
        BaseInstance = 4425,
        DrawIndex = 4426,
        DeviceIndex = 4438,
        ViewIndex = 4440,
        BaryCoordNoPerspAMD = 4992,
        BaryCoordNoPerspCentroidAMD = 4993,
        BaryCoordNoPerspSampleAMD = 4994,
        BaryCoordSmoothAMD = 4995,
        BaryCoordSmoothCentroidAMD = 4996,
        BaryCoordSmoothSampleAMD = 4997,
        BaryCoordPullModelAMD = 4998,
        FragStencilRefEXT = 5014,
        ViewportMaskNV = 5253,
        SecondaryPositionNV = 5257,
        SecondaryViewportMaskNV = 5258,
        PositionPerViewNV = 5261,
        ViewportMaskPerViewNV = 5262,
        FullyCoveredEXT = 5264,
    },
    SelectionControlShift = {
        Flatten = 0,
        DontFlatten = 1,
    },
    SelectionControlMask = {
        MaskNone = 0,
        Flatten = 0x00000001,
        DontFlatten = 0x00000002,
    },
    LoopControlShift = {
        Unroll = 0,
        DontUnroll = 1,
        DependencyInfinite = 2,
        DependencyLength = 3,
    },
    LoopControlMask = {
        MaskNone = 0,
        Unroll = 0x00000001,
        DontUnroll = 0x00000002,
        DependencyInfinite = 0x00000004,
        DependencyLength = 0x00000008,
    },
    FunctionControlShift = {
        Inline = 0,
        DontInline = 1,
        Pure = 2,
        Const = 3,
    },
    FunctionControlMask = {
        MaskNone = 0,
        Inline = 0x00000001,
        DontInline = 0x00000002,
        Pure = 0x00000004,
        Const = 0x00000008,
    },
    MemorySemanticsShift = {
        Acquire = 1,
        Release = 2,
        AcquireRelease = 3,
        SequentiallyConsistent = 4,
        UniformMemory = 6,
        SubgroupMemory = 7,
        WorkgroupMemory = 8,
        CrossWorkgroupMemory = 9,
        AtomicCounterMemory = 10,
        ImageMemory = 11,
    },
    MemorySemanticsMask = {
        MaskNone = 0,
        Acquire = 0x00000002,
        Release = 0x00000004,
        AcquireRelease = 0x00000008,
        SequentiallyConsistent = 0x00000010,
        UniformMemory = 0x00000040,
        SubgroupMemory = 0x00000080,
        WorkgroupMemory = 0x00000100,
        CrossWorkgroupMemory = 0x00000200,
        AtomicCounterMemory = 0x00000400,
        ImageMemory = 0x00000800,
    },
    MemoryAccessShift = {
        Volatile = 0,
        Aligned = 1,
        Nontemporal = 2,
    },
    MemoryAccessMask = {
        MaskNone = 0,
        Volatile = 0x00000001,
        Aligned = 0x00000002,
        Nontemporal = 0x00000004,
    },
    Scope = {
        CrossDevice = 0,
        Device = 1,
        Workgroup = 2,
        Subgroup = 3,
        Invocation = 4,
    },
    GroupOperation = {
        Reduce = 0,
        InclusiveScan = 1,
        ExclusiveScan = 2,
        ClusteredReduce = 3,
        PartitionedReduceNV = 6,
        PartitionedInclusiveScanNV = 7,
        PartitionedExclusiveScanNV = 8,
    },
    KernelEnqueueFlags = {
        NoWait = 0,
        WaitKernel = 1,
        WaitWorkGroup = 2,
    },
    KernelProfilingInfoShift = {
        CmdExecTime = 0,
    },
    KernelProfilingInfoMask = {
        MaskNone = 0,
        CmdExecTime = 0x00000001,
    },
    Capability = {
        Matrix = 0,
        Shader = 1,
        Geometry = 2,
        Tessellation = 3,
        Addresses = 4,
        Linkage = 5,
        Kernel = 6,
        Vector16 = 7,
        Float16Buffer = 8,
        Float16 = 9,
        Float64 = 10,
        Int64 = 11,
        Int64Atomics = 12,
        ImageBasic = 13,
        ImageReadWrite = 14,
        ImageMipmap = 15,
        Pipes = 17,
        Groups = 18,
        DeviceEnqueue = 19,
        LiteralSampler = 20,
        AtomicStorage = 21,
        Int16 = 22,
        TessellationPointSize = 23,
        GeometryPointSize = 24,
        ImageGatherExtended = 25,
        StorageImageMultisample = 27,
        UniformBufferArrayDynamicIndexing = 28,
        SampledImageArrayDynamicIndexing = 29,
        StorageBufferArrayDynamicIndexing = 30,
        StorageImageArrayDynamicIndexing = 31,
        ClipDistance = 32,
        CullDistance = 33,
        ImageCubeArray = 34,
        SampleRateShading = 35,
        ImageRect = 36,
        SampledRect = 37,
        GenericPointer = 38,
        Int8 = 39,
        InputAttachment = 40,
        SparseResidency = 41,
        MinLod = 42,
        Sampled1D = 43,
        Image1D = 44,
        SampledCubeArray = 45,
        SampledBuffer = 46,
        ImageBuffer = 47,
        ImageMSArray = 48,
        StorageImageExtendedFormats = 49,
        ImageQuery = 50,
        DerivativeControl = 51,
        InterpolationFunction = 52,
        TransformFeedback = 53,
        GeometryStreams = 54,
        StorageImageReadWithoutFormat = 55,
        StorageImageWriteWithoutFormat = 56,
        MultiViewport = 57,
        SubgroupDispatch = 58,
        NamedBarrier = 59,
        PipeStorage = 60,
        GroupNonUniform = 61,
        GroupNonUniformVote = 62,
        GroupNonUniformArithmetic = 63,
        GroupNonUniformBallot = 64,
        GroupNonUniformShuffle = 65,
        GroupNonUniformShuffleRelative = 66,
        GroupNonUniformClustered = 67,
        GroupNonUniformQuad = 68,
        SubgroupBallotKHR = 4423,
        DrawParameters = 4427,
        SubgroupVoteKHR = 4431,
        StorageBuffer16BitAccess = 4433,
        StorageUniformBufferBlock16 = 4433,
        StorageUniform16 = 4434,
        UniformAndStorageBuffer16BitAccess = 4434,
        StoragePushConstant16 = 4435,
        StorageInputOutput16 = 4436,
        DeviceGroup = 4437,
        MultiView = 4439,
        VariablePointersStorageBuffer = 4441,
        VariablePointers = 4442,
        AtomicStorageOps = 4445,
        SampleMaskPostDepthCoverage = 4447,
        Float16ImageAMD = 5008,
        ImageGatherBiasLodAMD = 5009,
        FragmentMaskAMD = 5010,
        StencilExportEXT = 5013,
        ImageReadWriteLodAMD = 5015,
        SampleMaskOverrideCoverageNV = 5249,
        GeometryShaderPassthroughNV = 5251,
        ShaderViewportIndexLayerEXT = 5254,
        ShaderViewportIndexLayerNV = 5254,
        ShaderViewportMaskNV = 5255,
        ShaderStereoViewNV = 5259,
        PerViewAttributesNV = 5260,
        FragmentFullyCoveredEXT = 5265,
        GroupNonUniformPartitionedNV = 5297,
        ShaderNonUniformEXT = 5301,
        RuntimeDescriptorArrayEXT = 5302,
        InputAttachmentArrayDynamicIndexingEXT = 5303,
        UniformTexelBufferArrayDynamicIndexingEXT = 5304,
        StorageTexelBufferArrayDynamicIndexingEXT = 5305,
        UniformBufferArrayNonUniformIndexingEXT = 5306,
        SampledImageArrayNonUniformIndexingEXT = 5307,
        StorageBufferArrayNonUniformIndexingEXT = 5308,
        StorageImageArrayNonUniformIndexingEXT = 5309,
        InputAttachmentArrayNonUniformIndexingEXT = 5310,
        UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
        StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
        SubgroupShuffleINTEL = 5568,
        SubgroupBufferBlockIOINTEL = 5569,
        SubgroupImageBlockIOINTEL = 5570,
    },
    Op = {
        OpNop = 0,
        OpUndef = 1,
        OpSourceContinued = 2,
        OpSource = 3,
        OpSourceExtension = 4,
        OpName = 5,
        OpMemberName = 6,
        OpString = 7,
        OpLine = 8,
        OpExtension = 10,
        OpExtInstImport = 11,
        OpExtInst = 12,
        OpMemoryModel = 14,
        OpEntryPoint = 15,
        OpExecutionMode = 16,
        OpCapability = 17,
        OpTypeVoid = 19,
        OpTypeBool = 20,
        OpTypeInt = 21,
        OpTypeFloat = 22,
        OpTypeVector = 23,
        OpTypeMatrix = 24,
        OpTypeImage = 25,
        OpTypeSampler = 26,
        OpTypeSampledImage = 27,
        OpTypeArray = 28,
        OpTypeRuntimeArray = 29,
        OpTypeStruct = 30,
        OpTypeOpaque = 31,
        OpTypePointer = 32,
        OpTypeFunction = 33,
        OpTypeEvent = 34,
        OpTypeDeviceEvent = 35,
        OpTypeReserveId = 36,
        OpTypeQueue = 37,
        OpTypePipe = 38,
        OpTypeForwardPointer = 39,
        OpConstantTrue = 41,
        OpConstantFalse = 42,
        OpConstant = 43,
        OpConstantComposite = 44,
        OpConstantSampler = 45,
        OpConstantNull = 46,
        OpSpecConstantTrue = 48,
        OpSpecConstantFalse = 49,
        OpSpecConstant = 50,
        OpSpecConstantComposite = 51,
        OpSpecConstantOp = 52,
        OpFunction = 54,
        OpFunctionParameter = 55,
        OpFunctionEnd = 56,
        OpFunctionCall = 57,
        OpVariable = 59,
        OpImageTexelPointer = 60,
        OpLoad = 61,
        OpStore = 62,
        OpCopyMemory = 63,
        OpCopyMemorySized = 64,
        OpAccessChain = 65,
        OpInBoundsAccessChain = 66,
        OpPtrAccessChain = 67,
        OpArrayLength = 68,
        OpGenericPtrMemSemantics = 69,
        OpInBoundsPtrAccessChain = 70,
        OpDecorate = 71,
        OpMemberDecorate = 72,
        OpDecorationGroup = 73,
        OpGroupDecorate = 74,
        OpGroupMemberDecorate = 75,
        OpVectorExtractDynamic = 77,
        OpVectorInsertDynamic = 78,
        OpVectorShuffle = 79,
        OpCompositeConstruct = 80,
        OpCompositeExtract = 81,
        OpCompositeInsert = 82,
        OpCopyObject = 83,
        OpTranspose = 84,
        OpSampledImage = 86,
        OpImageSampleImplicitLod = 87,
        OpImageSampleExplicitLod = 88,
        OpImageSampleDrefImplicitLod = 89,
        OpImageSampleDrefExplicitLod = 90,
        OpImageSampleProjImplicitLod = 91,
        OpImageSampleProjExplicitLod = 92,
        OpImageSampleProjDrefImplicitLod = 93,
        OpImageSampleProjDrefExplicitLod = 94,
        OpImageFetch = 95,
        OpImageGather = 96,
        OpImageDrefGather = 97,
        OpImageRead = 98,
        OpImageWrite = 99,
        OpImage = 100,
        OpImageQueryFormat = 101,
        OpImageQueryOrder = 102,
        OpImageQuerySizeLod = 103,
        OpImageQuerySize = 104,
        OpImageQueryLod = 105,
        OpImageQueryLevels = 106,
        OpImageQuerySamples = 107,
        OpConvertFToU = 109,
        OpConvertFToS = 110,
        OpConvertSToF = 111,
        OpConvertUToF = 112,
        OpUConvert = 113,
        OpSConvert = 114,
        OpFConvert = 115,
        OpQuantizeToF16 = 116,
        OpConvertPtrToU = 117,
        OpSatConvertSToU = 118,
        OpSatConvertUToS = 119,
        OpConvertUToPtr = 120,
        OpPtrCastToGeneric = 121,
        OpGenericCastToPtr = 122,
        OpGenericCastToPtrExplicit = 123,
        OpBitcast = 124,
        OpSNegate = 126,
        OpFNegate = 127,
        OpIAdd = 128,
        OpFAdd = 129,
        OpISub = 130,
        OpFSub = 131,
        OpIMul = 132,
        OpFMul = 133,
        OpUDiv = 134,
        OpSDiv = 135,
        OpFDiv = 136,
        OpUMod = 137,
        OpSRem = 138,
        OpSMod = 139,
        OpFRem = 140,
        OpFMod = 141,
        OpVectorTimesScalar = 142,
        OpMatrixTimesScalar = 143,
        OpVectorTimesMatrix = 144,
        OpMatrixTimesVector = 145,
        OpMatrixTimesMatrix = 146,
        OpOuterProduct = 147,
        OpDot = 148,
        OpIAddCarry = 149,
        OpISubBorrow = 150,
        OpUMulExtended = 151,
        OpSMulExtended = 152,
        OpAny = 154,
        OpAll = 155,
        OpIsNan = 156,
        OpIsInf = 157,
        OpIsFinite = 158,
        OpIsNormal = 159,
        OpSignBitSet = 160,
        OpLessOrGreater = 161,
        OpOrdered = 162,
        OpUnordered = 163,
        OpLogicalEqual = 164,
        OpLogicalNotEqual = 165,
        OpLogicalOr = 166,
        OpLogicalAnd = 167,
        OpLogicalNot = 168,
        OpSelect = 169,
        OpIEqual = 170,
        OpINotEqual = 171,
        OpUGreaterThan = 172,
        OpSGreaterThan = 173,
        OpUGreaterThanEqual = 174,
        OpSGreaterThanEqual = 175,
        OpULessThan = 176,
        OpSLessThan = 177,
        OpULessThanEqual = 178,
        OpSLessThanEqual = 179,
        OpFOrdEqual = 180,
        OpFUnordEqual = 181,
        OpFOrdNotEqual = 182,
        OpFUnordNotEqual = 183,
        OpFOrdLessThan = 184,
        OpFUnordLessThan = 185,
        OpFOrdGreaterThan = 186,
        OpFUnordGreaterThan = 187,
        OpFOrdLessThanEqual = 188,
        OpFUnordLessThanEqual = 189,
        OpFOrdGreaterThanEqual = 190,
        OpFUnordGreaterThanEqual = 191,
        OpShiftRightLogical = 194,
        OpShiftRightArithmetic = 195,
        OpShiftLeftLogical = 196,
        OpBitwiseOr = 197,
        OpBitwiseXor = 198,
        OpBitwiseAnd = 199,
        OpNot = 200,
        OpBitFieldInsert = 201,
        OpBitFieldSExtract = 202,
        OpBitFieldUExtract = 203,
        OpBitReverse = 204,
        OpBitCount = 205,
        OpDPdx = 207,
        OpDPdy = 208,
        OpFwidth = 209,
        OpDPdxFine = 210,
        OpDPdyFine = 211,
        OpFwidthFine = 212,
        OpDPdxCoarse = 213,
        OpDPdyCoarse = 214,
        OpFwidthCoarse = 215,
        OpEmitVertex = 218,
        OpEndPrimitive = 219,
        OpEmitStreamVertex = 220,
        OpEndStreamPrimitive = 221,
        OpControlBarrier = 224,
        OpMemoryBarrier = 225,
        OpAtomicLoad = 227,
        OpAtomicStore = 228,
        OpAtomicExchange = 229,
        OpAtomicCompareExchange = 230,
        OpAtomicCompareExchangeWeak = 231,
        OpAtomicIIncrement = 232,
        OpAtomicIDecrement = 233,
        OpAtomicIAdd = 234,
        OpAtomicISub = 235,
        OpAtomicSMin = 236,
        OpAtomicUMin = 237,
        OpAtomicSMax = 238,
        OpAtomicUMax = 239,
        OpAtomicAnd = 240,
        OpAtomicOr = 241,
        OpAtomicXor = 242,
        OpPhi = 245,
        OpLoopMerge = 246,
        OpSelectionMerge = 247,
        OpLabel = 248,
        OpBranch = 249,
        OpBranchConditional = 250,
        OpSwitch = 251,
        OpKill = 252,
        OpReturn = 253,
        OpReturnValue = 254,
        OpUnreachable = 255,
        OpLifetimeStart = 256,
        OpLifetimeStop = 257,
        OpGroupAsyncCopy = 259,
        OpGroupWaitEvents = 260,
        OpGroupAll = 261,
        OpGroupAny = 262,
        OpGroupBroadcast = 263,
        OpGroupIAdd = 264,
        OpGroupFAdd = 265,
        OpGroupFMin = 266,
        OpGroupUMin = 267,
        OpGroupSMin = 268,
        OpGroupFMax = 269,
        OpGroupUMax = 270,
        OpGroupSMax = 271,
        OpReadPipe = 274,
        OpWritePipe = 275,
        OpReservedReadPipe = 276,
        OpReservedWritePipe = 277,
        OpReserveReadPipePackets = 278,
        OpReserveWritePipePackets = 279,
        OpCommitReadPipe = 280,
        OpCommitWritePipe = 281,
        OpIsValidReserveId = 282,
        OpGetNumPipePackets = 283,
        OpGetMaxPipePackets = 284,
        OpGroupReserveReadPipePackets = 285,
        OpGroupReserveWritePipePackets = 286,
        OpGroupCommitReadPipe = 287,
        OpGroupCommitWritePipe = 288,
        OpEnqueueMarker = 291,
        OpEnqueueKernel = 292,
        OpGetKernelNDrangeSubGroupCount = 293,
        OpGetKernelNDrangeMaxSubGroupSize = 294,
        OpGetKernelWorkGroupSize = 295,
        OpGetKernelPreferredWorkGroupSizeMultiple = 296,
        OpRetainEvent = 297,
        OpReleaseEvent = 298,
        OpCreateUserEvent = 299,
        OpIsValidEvent = 300,
        OpSetUserEventStatus = 301,
        OpCaptureEventProfilingInfo = 302,
        OpGetDefaultQueue = 303,
        OpBuildNDRange = 304,
        OpImageSparseSampleImplicitLod = 305,
        OpImageSparseSampleExplicitLod = 306,
        OpImageSparseSampleDrefImplicitLod = 307,
        OpImageSparseSampleDrefExplicitLod = 308,
        OpImageSparseSampleProjImplicitLod = 309,
        OpImageSparseSampleProjExplicitLod = 310,
        OpImageSparseSampleProjDrefImplicitLod = 311,
        OpImageSparseSampleProjDrefExplicitLod = 312,
        OpImageSparseFetch = 313,
        OpImageSparseGather = 314,
        OpImageSparseDrefGather = 315,
        OpImageSparseTexelsResident = 316,
        OpNoLine = 317,
        OpAtomicFlagTestAndSet = 318,
        OpAtomicFlagClear = 319,
        OpImageSparseRead = 320,
        OpSizeOf = 321,
        OpTypePipeStorage = 322,
        OpConstantPipeStorage = 323,
        OpCreatePipeFromPipeStorage = 324,
        OpGetKernelLocalSizeForSubgroupCount = 325,
        OpGetKernelMaxNumSubgroups = 326,
        OpTypeNamedBarrier = 327,
        OpNamedBarrierInitialize = 328,
        OpMemoryNamedBarrier = 329,
        OpModuleProcessed = 330,
        OpExecutionModeId = 331,
        OpDecorateId = 332,
        OpGroupNonUniformElect = 333,
        OpGroupNonUniformAll = 334,
        OpGroupNonUniformAny = 335,
        OpGroupNonUniformAllEqual = 336,
        OpGroupNonUniformBroadcast = 337,
        OpGroupNonUniformBroadcastFirst = 338,
        OpGroupNonUniformBallot = 339,
        OpGroupNonUniformInverseBallot = 340,
        OpGroupNonUniformBallotBitExtract = 341,
        OpGroupNonUniformBallotBitCount = 342,
        OpGroupNonUniformBallotFindLSB = 343,
        OpGroupNonUniformBallotFindMSB = 344,
        OpGroupNonUniformShuffle = 345,
        OpGroupNonUniformShuffleXor = 346,
        OpGroupNonUniformShuffleUp = 347,
        OpGroupNonUniformShuffleDown = 348,
        OpGroupNonUniformIAdd = 349,
        OpGroupNonUniformFAdd = 350,
        OpGroupNonUniformIMul = 351,
        OpGroupNonUniformFMul = 352,
        OpGroupNonUniformSMin = 353,
        OpGroupNonUniformUMin = 354,
        OpGroupNonUniformFMin = 355,
        OpGroupNonUniformSMax = 356,
        OpGroupNonUniformUMax = 357,
        OpGroupNonUniformFMax = 358,
        OpGroupNonUniformBitwiseAnd = 359,
        OpGroupNonUniformBitwiseOr = 360,
        OpGroupNonUniformBitwiseXor = 361,
        OpGroupNonUniformLogicalAnd = 362,
        OpGroupNonUniformLogicalOr = 363,
        OpGroupNonUniformLogicalXor = 364,
        OpGroupNonUniformQuadBroadcast = 365,
        OpGroupNonUniformQuadSwap = 366,
        OpSubgroupBallotKHR = 4421,
        OpSubgroupFirstInvocationKHR = 4422,
        OpSubgroupAllKHR = 4428,
        OpSubgroupAnyKHR = 4429,
        OpSubgroupAllEqualKHR = 4430,
        OpSubgroupReadInvocationKHR = 4432,
        OpGroupIAddNonUniformAMD = 5000,
        OpGroupFAddNonUniformAMD = 5001,
        OpGroupFMinNonUniformAMD = 5002,
        OpGroupUMinNonUniformAMD = 5003,
        OpGroupSMinNonUniformAMD = 5004,
        OpGroupFMaxNonUniformAMD = 5005,
        OpGroupUMaxNonUniformAMD = 5006,
        OpGroupSMaxNonUniformAMD = 5007,
        OpFragmentMaskFetchAMD = 5011,
        OpFragmentFetchAMD = 5012,
        OpGroupNonUniformPartitionNV = 5296,
        OpSubgroupShuffleINTEL = 5571,
        OpSubgroupShuffleDownINTEL = 5572,
        OpSubgroupShuffleUpINTEL = 5573,
        OpSubgroupShuffleXorINTEL = 5574,
        OpSubgroupBlockReadINTEL = 5575,
        OpSubgroupBlockWriteINTEL = 5576,
        OpSubgroupImageBlockReadINTEL = 5577,
        OpSubgroupImageBlockWriteINTEL = 5578,
        OpDecorateStringGOOGLE = 5632,
        OpMemberDecorateStringGOOGLE = 5633,
    },
}


-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
-- IN THE MATERIALS.
-- This header is automatically generated by the same tool that creates
-- the Binary Section of the SPIR-V specification.
-- Enumeration tokens for SPIR-V, in various styles:
--   C, C++, C++11, JSON, Lua, Python
--
-- - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
-- - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
-- - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
-- - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
-- - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
--
-- Some tokens act like mask values, which can be OR'd together,
-- while others are mutually exclusive.  The mask-like ones have
-- "Mask" in their name, and a parallel enum that has the shift
-- amount (1 << x) for each corresponding enumerant.
spv = {
    MagicNumber = 0x07230203,
    Version = 0x00010100,
    Revision = 8,
    OpCodeMask = 0xffff,
    WordCountShift = 16,
    SourceLanguage = {
        Unknown = 0,
        ESSL = 1,
        GLSL = 2,
        OpenCL_C = 3,
        OpenCL_CPP = 4,
        HLSL = 5,
    },
    ExecutionModel = {
        Vertex = 0,
        TessellationControl = 1,
        TessellationEvaluation = 2,
        Geometry = 3,
        Fragment = 4,
        GLCompute = 5,
        Kernel = 6,
    },
    AddressingModel = {
        Logical = 0,
        Physical32 = 1,
        Physical64 = 2,
    },
    MemoryModel = {
        Simple = 0,
        GLSL450 = 1,
        OpenCL = 2,
    },
    ExecutionMode = {
        Invocations = 0,
        SpacingEqual = 1,
        SpacingFractionalEven = 2,
        SpacingFractionalOdd = 3,
        VertexOrderCw = 4,
        VertexOrderCcw = 5,
        PixelCenterInteger = 6,
        OriginUpperLeft = 7,
        OriginLowerLeft = 8,
        EarlyFragmentTests = 9,
        PointMode = 10,
        Xfb = 11,
        DepthReplacing = 12,
        DepthGreater = 14,
        DepthLess = 15,
        DepthUnchanged = 16,
        LocalSize = 17,
        LocalSizeHint = 18,
        InputPoints = 19,
        InputLines = 20,
        InputLinesAdjacency = 21,
        Triangles = 22,
        InputTrianglesAdjacency = 23,
        Quads = 24,
        Isolines = 25,
        OutputVertices = 26,
        OutputPoints = 27,
        OutputLineStrip = 28,
        OutputTriangleStrip = 29,
        VecTypeHint = 30,
        ContractionOff = 31,
        Initializer = 33,
        Finalizer = 34,
        SubgroupSize = 35,
        SubgroupsPerWorkgroup = 36,
        PostDepthCoverage = 4446,
        StencilRefReplacingEXT = 5027,
    },
    StorageClass = {
        UniformConstant = 0,
        Input = 1,
        Uniform = 2,
        Output = 3,
        Workgroup = 4,
        CrossWorkgroup = 5,
        Private = 6,
        Function = 7,
        Generic = 8,
        PushConstant = 9,
        AtomicCounter = 10,
        Image = 11,
        StorageBuffer = 12,
    },
    Dim = {
        Dim1D = 0,
        Dim2D = 1,
        Dim3D = 2,
        Cube = 3,
        Rect = 4,
        Buffer = 5,
        SubpassData = 6,
    },
    SamplerAddressingMode = {
        None = 0,
        ClampToEdge = 1,
        Clamp = 2,
        Repeat = 3,
        RepeatMirrored = 4,
    },
    SamplerFilterMode = {
        Nearest = 0,
        Linear = 1,
    },
    ImageFormat = {
        Unknown = 0,
        Rgba32f = 1,
        Rgba16f = 2,
        R32f = 3,
        Rgba8 = 4,
        Rgba8Snorm = 5,
        Rg32f = 6,
        Rg16f = 7,
        R11fG11fB10f = 8,
        R16f = 9,
        Rgba16 = 10,
        Rgb10A2 = 11,
        Rg16 = 12,
        Rg8 = 13,
        R16 = 14,
        R8 = 15,
        Rgba16Snorm = 16,
        Rg16Snorm = 17,
        Rg8Snorm = 18,
        R16Snorm = 19,
        R8Snorm = 20,
        Rgba32i = 21,
        Rgba16i = 22,
        Rgba8i = 23,
        R32i = 24,
        Rg32i = 25,
        Rg16i = 26,
        Rg8i = 27,
        R16i = 28,
        R8i = 29,
        Rgba32ui = 30,
        Rgba16ui = 31,
        Rgba8ui = 32,
        R32ui = 33,
        Rgb10a2ui = 34,
        Rg32ui = 35,
        Rg16ui = 36,
        Rg8ui = 37,
        R16ui = 38,
        R8ui = 39,
    },
    ImageChannelOrder = {
        R = 0,
        A = 1,
        RG = 2,
        RA = 3,
        RGB = 4,
        RGBA = 5,
        BGRA = 6,
        ARGB = 7,
        Intensity = 8,
        Luminance = 9,
        Rx = 10,
        RGx = 11,
        RGBx = 12,
        Depth = 13,
        DepthStencil = 14,
        sRGB = 15,
        sRGBx = 16,
        sRGBA = 17,
        sBGRA = 18,
        ABGR = 19,
    },
    ImageChannelDataType = {
        SnormInt8 = 0,
        SnormInt16 = 1,
        UnormInt8 = 2,
        UnormInt16 = 3,
        UnormShort565 = 4,
        UnormShort555 = 5,
        UnormInt101010 = 6,
        SignedInt8 = 7,
        SignedInt16 = 8,
        SignedInt32 = 9,
        UnsignedInt8 = 10,
        UnsignedInt16 = 11,
        UnsignedInt32 = 12,
        HalfFloat = 13,
        Float = 14,
        UnormInt24 = 15,
        UnormInt101010_2 = 16,
    },
    ImageOperandsShift = {
        Bias = 0,
        Lod = 1,
        Grad = 2,
        ConstOffset = 3,
        Offset = 4,
        ConstOffsets = 5,
        Sample = 6,
        MinLod = 7,
    },
    ImageOperandsMask = {
        MaskNone = 0,
        Bias = 0x00000001,
        Lod = 0x00000002,
        Grad = 0x00000004,
        ConstOffset = 0x00000008,
        Offset = 0x00000010,
        ConstOffsets = 0x00000020,
        Sample = 0x00000040,
        MinLod = 0x00000080,
    },
    FPFastMathModeShift = {
        NotNaN = 0,
        NotInf = 1,
        NSZ = 2,
        AllowRecip = 3,
        Fast = 4,
    },
    FPFastMathModeMask = {
        MaskNone = 0,
        NotNaN = 0x00000001,
        NotInf = 0x00000002,
        NSZ = 0x00000004,
        AllowRecip = 0x00000008,
        Fast = 0x00000010,
    },
    FPRoundingMode = {
        RTE = 0,
        RTZ = 1,
        RTP = 2,
        RTN = 3,
    },
    LinkageType = {
        Export = 0,
        Import = 1,
    },
    AccessQualifier = {
        ReadOnly = 0,
        WriteOnly = 1,
        ReadWrite = 2,
    },
    FunctionParameterAttribute = {
        Zext = 0,
        Sext = 1,
        ByVal = 2,
        Sret = 3,
        NoAlias = 4,
        NoCapture = 5,
        NoWrite = 6,
        NoReadWrite = 7,
    },
    Decoration = {
        RelaxedPrecision = 0,
        SpecId = 1,
        Block = 2,
        BufferBlock = 3,
        RowMajor = 4,
        ColMajor = 5,
        ArrayStride = 6,
        MatrixStride = 7,
        GLSLShared = 8,
        GLSLPacked = 9,
        CPacked = 10,
        BuiltIn = 11,
        NoPerspective = 13,
        Flat = 14,
        Patch = 15,
        Centroid = 16,
        Sample = 17,
        Invariant = 18,
        Restrict = 19,
        Aliased = 20,
        Volatile = 21,
        Constant = 22,
        Coherent = 23,
        NonWritable = 24,
        NonReadable = 25,
        Uniform = 26,
        SaturatedConversion = 28,
        Stream = 29,
        Location = 30,
        Component = 31,
        Index = 32,
        Binding = 33,
        DescriptorSet = 34,
        Offset = 35,
        XfbBuffer = 36,
        XfbStride = 37,
        FuncParamAttr = 38,
        FPRoundingMode = 39,
        FPFastMathMode = 40,
        LinkageAttributes = 41,
        NoContraction = 42,
        InputAttachmentIndex = 43,
        Alignment = 44,
        MaxByteOffset = 45,
        ExplicitInterpAMD = 4999,
        OverrideCoverageNV = 5248,
        PassthroughNV = 5250,
        ViewportRelativeNV = 5252,
        SecondaryViewportRelativeNV = 5256,
        HlslCounterBufferGOOGLE = 5634,
        HlslSemanticGOOGLE = 5635,
    },
    BuiltIn = {
        Position = 0,
        PointSize = 1,
        ClipDistance = 3,
        CullDistance = 4,
        VertexId = 5,
        InstanceId = 6,
        PrimitiveId = 7,
        InvocationId = 8,
        Layer = 9,
        ViewportIndex = 10,
        TessLevelOuter = 11,
        TessLevelInner = 12,
        TessCoord = 13,
        PatchVertices = 14,
        FragCoord = 15,
        PointCoord = 16,
        FrontFacing = 17,
        SampleId = 18,
        SamplePosition = 19,
        SampleMask = 20,
        FragDepth = 22,
        HelperInvocation = 23,
        NumWorkgroups = 24,
        WorkgroupSize = 25,
        WorkgroupId = 26,
        LocalInvocationId = 27,
        GlobalInvocationId = 28,
        LocalInvocationIndex = 29,
        WorkDim = 30,
        GlobalSize = 31,
        EnqueuedWorkgroupSize = 32,
        GlobalOffset = 33,
        GlobalLinearId = 34,
        SubgroupSize = 36,
        SubgroupMaxSize = 37,
        NumSubgroups = 38,
        NumEnqueuedSubgroups = 39,
        SubgroupId = 40,
        SubgroupLocalInvocationId = 41,
        VertexIndex = 42,
        InstanceIndex = 43,
        SubgroupEqMaskKHR = 4416,
        SubgroupGeMaskKHR = 4417,
        SubgroupGtMaskKHR = 4418,
        SubgroupLeMaskKHR = 4419,
        SubgroupLtMaskKHR = 4420,
        BaseVertex = 4424,
        BaseInstance = 4425,
        DrawIndex = 4426,
        DeviceIndex = 4438,
        ViewIndex = 4440,
        BaryCoordNoPerspAMD = 4992,
        BaryCoordNoPerspCentroidAMD = 4993,
        BaryCoordNoPerspSampleAMD = 4994,
        BaryCoordSmoothAMD = 4995,
        BaryCoordSmoothCentroidAMD = 4996,
        BaryCoordSmoothSampleAMD = 4997,
        BaryCoordPullModelAMD = 4998,
        FragStencilRefEXT = 5014,
        ViewportMaskNV = 5253,
        SecondaryPositionNV = 5257,
        SecondaryViewportMaskNV = 5258,
        PositionPerViewNV = 5261,
        ViewportMaskPerViewNV = 5262,
    },
    SelectionControlShift = {
        Flatten = 0,
        DontFlatten = 1,
    },
    SelectionControlMask = {
        MaskNone = 0,
        Flatten = 0x00000001,
        DontFlatten = 0x00000002,
    },
    LoopControlShift = {
        Unroll = 0,
        DontUnroll = 1,
        DependencyInfinite = 2,
        DependencyLength = 3,
    },
    LoopControlMask = {
        MaskNone = 0,
        Unroll = 0x00000001,
        DontUnroll = 0x00000002,
        DependencyInfinite = 0x00000004,
        DependencyLength = 0x00000008,
    },
    FunctionControlShift = {
        Inline = 0,
        DontInline = 1,
        Pure = 2,
        Const = 3,
    },
    FunctionControlMask = {
        MaskNone = 0,
        Inline = 0x00000001,
        DontInline = 0x00000002,
        Pure = 0x00000004,
        Const = 0x00000008,
    },
    MemorySemanticsShift = {
        Acquire = 1,
        Release = 2,
        AcquireRelease = 3,
        SequentiallyConsistent = 4,
        UniformMemory = 6,
        SubgroupMemory = 7,
        WorkgroupMemory = 8,
        CrossWorkgroupMemory = 9,
        AtomicCounterMemory = 10,
        ImageMemory = 11,
    },
    MemorySemanticsMask = {
        MaskNone = 0,
        Acquire = 0x00000002,
        Release = 0x00000004,
        AcquireRelease = 0x00000008,
        SequentiallyConsistent = 0x00000010,
        UniformMemory = 0x00000040,
        SubgroupMemory = 0x00000080,
        WorkgroupMemory = 0x00000100,
        CrossWorkgroupMemory = 0x00000200,
        AtomicCounterMemory = 0x00000400,
        ImageMemory = 0x00000800,
    },
    MemoryAccessShift = {
        Volatile = 0,
        Aligned = 1,
        Nontemporal = 2,
    },
    MemoryAccessMask = {
        MaskNone = 0,
        Volatile = 0x00000001,
        Aligned = 0x00000002,
        Nontemporal = 0x00000004,
    },
    Scope = {
        CrossDevice = 0,
        Device = 1,
        Workgroup = 2,
        Subgroup = 3,
        Invocation = 4,
    },
    GroupOperation = {
        Reduce = 0,
        InclusiveScan = 1,
        ExclusiveScan = 2,
    },
    KernelEnqueueFlags = {
        NoWait = 0,
        WaitKernel = 1,
        WaitWorkGroup = 2,
    },
    KernelProfilingInfoShift = {
        CmdExecTime = 0,
    },
    KernelProfilingInfoMask = {
        MaskNone = 0,
        CmdExecTime = 0x00000001,
    },
    Capability = {
        Matrix = 0,
        Shader = 1,
        Geometry = 2,
        Tessellation = 3,
        Addresses = 4,
        Linkage = 5,
        Kernel = 6,
        Vector16 = 7,
        Float16Buffer = 8,
        Float16 = 9,
        Float64 = 10,
        Int64 = 11,
        Int64Atomics = 12,
        ImageBasic = 13,
        ImageReadWrite = 14,
        ImageMipmap = 15,
        Pipes = 17,
        Groups = 18,
        DeviceEnqueue = 19,
        LiteralSampler = 20,
        AtomicStorage = 21,
        Int16 = 22,
        TessellationPointSize = 23,
        GeometryPointSize = 24,
        ImageGatherExtended = 25,
        StorageImageMultisample = 27,
        UniformBufferArrayDynamicIndexing = 28,
        SampledImageArrayDynamicIndexing = 29,
        StorageBufferArrayDynamicIndexing = 30,
        StorageImageArrayDynamicIndexing = 31,
        ClipDistance = 32,
        CullDistance = 33,
        ImageCubeArray = 34,
        SampleRateShading = 35,
        ImageRect = 36,
        SampledRect = 37,
        GenericPointer = 38,
        Int8 = 39,
        InputAttachment = 40,
        SparseResidency = 41,
        MinLod = 42,
        Sampled1D = 43,
        Image1D = 44,
        SampledCubeArray = 45,
        SampledBuffer = 46,
        ImageBuffer = 47,
        ImageMSArray = 48,
        StorageImageExtendedFormats = 49,
        ImageQuery = 50,
        DerivativeControl = 51,
        InterpolationFunction = 52,
        TransformFeedback = 53,
        GeometryStreams = 54,
        StorageImageReadWithoutFormat = 55,
        StorageImageWriteWithoutFormat = 56,
        MultiViewport = 57,
        SubgroupDispatch = 58,
        NamedBarrier = 59,
        PipeStorage = 60,
        SubgroupBallotKHR = 4423,
        DrawParameters = 4427,
        SubgroupVoteKHR = 4431,
        StorageBuffer16BitAccess = 4433,
        StorageUniformBufferBlock16 = 4433,
        StorageUniform16 = 4434,
        UniformAndStorageBuffer16BitAccess = 4434,
        StoragePushConstant16 = 4435,
        StorageInputOutput16 = 4436,
        DeviceGroup = 4437,
        MultiView = 4439,
        VariablePointersStorageBuffer = 4441,
        VariablePointers = 4442,
        AtomicStorageOps = 4445,
        SampleMaskPostDepthCoverage = 4447,
        ImageGatherBiasLodAMD = 5009,
        FragmentMaskAMD = 5010,
        StencilExportEXT = 5013,
        ImageReadWriteLodAMD = 5015,
        SampleMaskOverrideCoverageNV = 5249,
        GeometryShaderPassthroughNV = 5251,
        ShaderViewportIndexLayerEXT = 5254,
        ShaderViewportIndexLayerNV = 5254,
        ShaderViewportMaskNV = 5255,
        ShaderStereoViewNV = 5259,
        PerViewAttributesNV = 5260,
        SubgroupShuffleINTEL = 5568,
        SubgroupBufferBlockIOINTEL = 5569,
        SubgroupImageBlockIOINTEL = 5570,
    },
    Op = {
        OpNop = 0,
        OpUndef = 1,
        OpSourceContinued = 2,
        OpSource = 3,
        OpSourceExtension = 4,
        OpName = 5,
        OpMemberName = 6,
        OpString = 7,
        OpLine = 8,
        OpExtension = 10,
        OpExtInstImport = 11,
        OpExtInst = 12,
        OpMemoryModel = 14,
        OpEntryPoint = 15,
        OpExecutionMode = 16,
        OpCapability = 17,
        OpTypeVoid = 19,
        OpTypeBool = 20,
        OpTypeInt = 21,
        OpTypeFloat = 22,
        OpTypeVector = 23,
        OpTypeMatrix = 24,
        OpTypeImage = 25,
        OpTypeSampler = 26,
        OpTypeSampledImage = 27,
        OpTypeArray = 28,
        OpTypeRuntimeArray = 29,
        OpTypeStruct = 30,
        OpTypeOpaque = 31,
        OpTypePointer = 32,
        OpTypeFunction = 33,
        OpTypeEvent = 34,
        OpTypeDeviceEvent = 35,
        OpTypeReserveId = 36,
        OpTypeQueue = 37,
        OpTypePipe = 38,
        OpTypeForwardPointer = 39,
        OpConstantTrue = 41,
        OpConstantFalse = 42,
        OpConstant = 43,
        OpConstantComposite = 44,
        OpConstantSampler = 45,
        OpConstantNull = 46,
        OpSpecConstantTrue = 48,
        OpSpecConstantFalse = 49,
        OpSpecConstant = 50,
        OpSpecConstantComposite = 51,
        OpSpecConstantOp = 52,
        OpFunction = 54,
        OpFunctionParameter = 55,
        OpFunctionEnd = 56,
        OpFunctionCall = 57,
        OpVariable = 59,
        OpImageTexelPointer = 60,
        OpLoad = 61,
        OpStore = 62,
        OpCopyMemory = 63,
        OpCopyMemorySized = 64,
        OpAccessChain = 65,
        OpInBoundsAccessChain = 66,
        OpPtrAccessChain = 67,
        OpArrayLength = 68,
        OpGenericPtrMemSemantics = 69,
        OpInBoundsPtrAccessChain = 70,
        OpDecorate = 71,
        OpMemberDecorate = 72,
        OpDecorationGroup = 73,
        OpGroupDecorate = 74,
        OpGroupMemberDecorate = 75,
        OpVectorExtractDynamic = 77,
        OpVectorInsertDynamic = 78,
        OpVectorShuffle = 79,
        OpCompositeConstruct = 80,
        OpCompositeExtract = 81,
        OpCompositeInsert = 82,
        OpCopyObject = 83,
        OpTranspose = 84,
        OpSampledImage = 86,
        OpImageSampleImplicitLod = 87,
        OpImageSampleExplicitLod = 88,
        OpImageSampleDrefImplicitLod = 89,
        OpImageSampleDrefExplicitLod = 90,
        OpImageSampleProjImplicitLod = 91,
        OpImageSampleProjExplicitLod = 92,
        OpImageSampleProjDrefImplicitLod = 93,
        OpImageSampleProjDrefExplicitLod = 94,
        OpImageFetch = 95,
        OpImageGather = 96,
        OpImageDrefGather = 97,
        OpImageRead = 98,
        OpImageWrite = 99,
        OpImage = 100,
        OpImageQueryFormat = 101,
        OpImageQueryOrder = 102,
        OpImageQuerySizeLod = 103,
        OpImageQuerySize = 104,
        OpImageQueryLod = 105,
        OpImageQueryLevels = 106,
        OpImageQuerySamples = 107,
        OpConvertFToU = 109,
        OpConvertFToS = 110,
        OpConvertSToF = 111,
        OpConvertUToF = 112,
        OpUConvert = 113,
        OpSConvert = 114,
        OpFConvert = 115,
        OpQuantizeToF16 = 116,
        OpConvertPtrToU = 117,
        OpSatConvertSToU = 118,
        OpSatConvertUToS = 119,
        OpConvertUToPtr = 120,
        OpPtrCastToGeneric = 121,
        OpGenericCastToPtr = 122,
        OpGenericCastToPtrExplicit = 123,
        OpBitcast = 124,
        OpSNegate = 126,
        OpFNegate = 127,
        OpIAdd = 128,
        OpFAdd = 129,
        OpISub = 130,
        OpFSub = 131,
        OpIMul = 132,
        OpFMul = 133,
        OpUDiv = 134,
        OpSDiv = 135,
        OpFDiv = 136,
        OpUMod = 137,
        OpSRem = 138,
        OpSMod = 139,
        OpFRem = 140,
        OpFMod = 141,
        OpVectorTimesScalar = 142,
        OpMatrixTimesScalar = 143,
        OpVectorTimesMatrix = 144,
        OpMatrixTimesVector = 145,
        OpMatrixTimesMatrix = 146,
        OpOuterProduct = 147,
        OpDot = 148,
        OpIAddCarry = 149,
        OpISubBorrow = 150,
        OpUMulExtended = 151,
        OpSMulExtended = 152,
        OpAny = 154,
        OpAll = 155,
        OpIsNan = 156,
        OpIsInf = 157,
        OpIsFinite = 158,
        OpIsNormal = 159,
        OpSignBitSet = 160,
        OpLessOrGreater = 161,
        OpOrdered = 162,
        OpUnordered = 163,
        OpLogicalEqual = 164,
        OpLogicalNotEqual = 165,
        OpLogicalOr = 166,
        OpLogicalAnd = 167,
        OpLogicalNot = 168,
        OpSelect = 169,
        OpIEqual = 170,
        OpINotEqual = 171,
        OpUGreaterThan = 172,
        OpSGreaterThan = 173,
        OpUGreaterThanEqual = 174,
        OpSGreaterThanEqual = 175,
        OpULessThan = 176,
        OpSLessThan = 177,
        OpULessThanEqual = 178,
        OpSLessThanEqual = 179,
        OpFOrdEqual = 180,
        OpFUnordEqual = 181,
        OpFOrdNotEqual = 182,
        OpFUnordNotEqual = 183,
        OpFOrdLessThan = 184,
        OpFUnordLessThan = 185,
        OpFOrdGreaterThan = 186,
        OpFUnordGreaterThan = 187,
        OpFOrdLessThanEqual = 188,
        OpFUnordLessThanEqual = 189,
        OpFOrdGreaterThanEqual = 190,
        OpFUnordGreaterThanEqual = 191,
        OpShiftRightLogical = 194,
        OpShiftRightArithmetic = 195,
        OpShiftLeftLogical = 196,
        OpBitwiseOr = 197,
        OpBitwiseXor = 198,
        OpBitwiseAnd = 199,
        OpNot = 200,
        OpBitFieldInsert = 201,
        OpBitFieldSExtract = 202,
        OpBitFieldUExtract = 203,
        OpBitReverse = 204,
        OpBitCount = 205,
        OpDPdx = 207,
        OpDPdy = 208,
        OpFwidth = 209,
        OpDPdxFine = 210,
        OpDPdyFine = 211,
        OpFwidthFine = 212,
        OpDPdxCoarse = 213,
        OpDPdyCoarse = 214,
        OpFwidthCoarse = 215,
        OpEmitVertex = 218,
        OpEndPrimitive = 219,
        OpEmitStreamVertex = 220,
        OpEndStreamPrimitive = 221,
        OpControlBarrier = 224,
        OpMemoryBarrier = 225,
        OpAtomicLoad = 227,
        OpAtomicStore = 228,
        OpAtomicExchange = 229,
        OpAtomicCompareExchange = 230,
        OpAtomicCompareExchangeWeak = 231,
        OpAtomicIIncrement = 232,
        OpAtomicIDecrement = 233,
        OpAtomicIAdd = 234,
        OpAtomicISub = 235,
        OpAtomicSMin = 236,
        OpAtomicUMin = 237,
        OpAtomicSMax = 238,
        OpAtomicUMax = 239,
        OpAtomicAnd = 240,
        OpAtomicOr = 241,
        OpAtomicXor = 242,
        OpPhi = 245,
        OpLoopMerge = 246,
        OpSelectionMerge = 247,
        OpLabel = 248,
        OpBranch = 249,
        OpBranchConditional = 250,
        OpSwitch = 251,
        OpKill = 252,
        OpReturn = 253,
        OpReturnValue = 254,
        OpUnreachable = 255,
        OpLifetimeStart = 256,
        OpLifetimeStop = 257,
        OpGroupAsyncCopy = 259,
        OpGroupWaitEvents = 260,
        OpGroupAll = 261,
        OpGroupAny = 262,
        OpGroupBroadcast = 263,
        OpGroupIAdd = 264,
        OpGroupFAdd = 265,
        OpGroupFMin = 266,
        OpGroupUMin = 267,
        OpGroupSMin = 268,
        OpGroupFMax = 269,
        OpGroupUMax = 270,
        OpGroupSMax = 271,
        OpReadPipe = 274,
        OpWritePipe = 275,
        OpReservedReadPipe = 276,
        OpReservedWritePipe = 277,
        OpReserveReadPipePackets = 278,
        OpReserveWritePipePackets = 279,
        OpCommitReadPipe = 280,
        OpCommitWritePipe = 281,
        OpIsValidReserveId = 282,
        OpGetNumPipePackets = 283,
        OpGetMaxPipePackets = 284,
        OpGroupReserveReadPipePackets = 285,
        OpGroupReserveWritePipePackets = 286,
        OpGroupCommitReadPipe = 287,
        OpGroupCommitWritePipe = 288,
        OpEnqueueMarker = 291,
        OpEnqueueKernel = 292,
        OpGetKernelNDrangeSubGroupCount = 293,
        OpGetKernelNDrangeMaxSubGroupSize = 294,
        OpGetKernelWorkGroupSize = 295,
        OpGetKernelPreferredWorkGroupSizeMultiple = 296,
        OpRetainEvent = 297,
        OpReleaseEvent = 298,
        OpCreateUserEvent = 299,
        OpIsValidEvent = 300,
        OpSetUserEventStatus = 301,
        OpCaptureEventProfilingInfo = 302,
        OpGetDefaultQueue = 303,
        OpBuildNDRange = 304,
        OpImageSparseSampleImplicitLod = 305,
        OpImageSparseSampleExplicitLod = 306,
        OpImageSparseSampleDrefImplicitLod = 307,
        OpImageSparseSampleDrefExplicitLod = 308,
        OpImageSparseSampleProjImplicitLod = 309,
        OpImageSparseSampleProjExplicitLod = 310,
        OpImageSparseSampleProjDrefImplicitLod = 311,
        OpImageSparseSampleProjDrefExplicitLod = 312,
        OpImageSparseFetch = 313,
        OpImageSparseGather = 314,
        OpImageSparseDrefGather = 315,
        OpImageSparseTexelsResident = 316,
        OpNoLine = 317,
        OpAtomicFlagTestAndSet = 318,
        OpAtomicFlagClear = 319,
        OpImageSparseRead = 320,
        OpSizeOf = 321,
        OpTypePipeStorage = 322,
        OpConstantPipeStorage = 323,
        OpCreatePipeFromPipeStorage = 324,
        OpGetKernelLocalSizeForSubgroupCount = 325,
        OpGetKernelMaxNumSubgroups = 326,
        OpTypeNamedBarrier = 327,
        OpNamedBarrierInitialize = 328,
        OpMemoryNamedBarrier = 329,
        OpModuleProcessed = 330,
        OpDecorateId = 332,
        OpSubgroupBallotKHR = 4421,
        OpSubgroupFirstInvocationKHR = 4422,
        OpSubgroupAllKHR = 4428,
        OpSubgroupAnyKHR = 4429,
        OpSubgroupAllEqualKHR = 4430,
        OpSubgroupReadInvocationKHR = 4432,
        OpGroupIAddNonUniformAMD = 5000,
        OpGroupFAddNonUniformAMD = 5001,
        OpGroupFMinNonUniformAMD = 5002,
        OpGroupUMinNonUniformAMD = 5003,
        OpGroupSMinNonUniformAMD = 5004,
        OpGroupFMaxNonUniformAMD = 5005,
        OpGroupUMaxNonUniformAMD = 5006,
        OpGroupSMaxNonUniformAMD = 5007,
        OpFragmentMaskFetchAMD = 5011,
        OpFragmentFetchAMD = 5012,
        OpSubgroupShuffleINTEL = 5571,
        OpSubgroupShuffleDownINTEL = 5572,
        OpSubgroupShuffleUpINTEL = 5573,
        OpSubgroupShuffleXorINTEL = 5574,
        OpSubgroupBlockReadINTEL = 5575,
        OpSubgroupBlockWriteINTEL = 5576,
        OpSubgroupImageBlockReadINTEL = 5577,
        OpSubgroupImageBlockWriteINTEL = 5578,
        OpDecorateStringGOOGLE = 5632,
        OpMemberDecorateStringGOOGLE = 5633,
    },
}