Use opaque context object to hold SPIR-V info tables.
authorLei Zhang <antiagainst@google.com>
Thu, 12 Nov 2015 18:48:30 +0000 (13:48 -0500)
committerDavid Neto <dneto@google.com>
Thu, 12 Nov 2015 21:27:51 +0000 (16:27 -0500)
commit972788bf239daff45ed0d2bb878e608c4106939c
tree1c432958e4fa2f82ffd6afa42ad658a53729cc6b
parent321c3e206b3fa8713cc6f20e8821572354882599
Use opaque context object to hold SPIR-V info tables.

Previously the opcode table is declared as an global array and we
have spvOpcodeTableInitialize() modifying it. That can result in
race condition. Now spvOpcodeTabelGet() copies the whole underlying
array.
25 files changed:
CMakeLists.txt
include/libspirv/libspirv.h
source/assembly_grammar.cpp
source/assembly_grammar.h
source/binary.cpp
source/disassemble.cpp
source/opcode.cpp
source/table.cpp [new file with mode: 0644]
source/table.h
source/text.cpp
source/validate.cpp
test/AssemblyFormat.cpp
test/BinaryDestroy.cpp
test/BinaryToText.cpp
test/ExtInstGLSLstd450.cpp
test/ImmediateInt.cpp
test/NamedId.cpp
test/TestFixture.h
test/TextDestroy.cpp
test/TextToBinary.cpp
test/Validate.cpp
test/ValidateID.cpp
tools/as/as.cpp
tools/dis/dis.cpp
tools/val/val.cpp