Use Tint Generator Number.

This Cl updates the code to use the new Tint generator ID.

Bug: tint:5

11d7637e7a..308bd07424

$ git log 11d7637e7..308bd0742 --date=short --no-merges --format='%ad %ae %s'
2020-06-26 dj2 Register the Tint compiler

Created with:
  roll-dep build buildtools testing third_party/binutils third_party/googletest third_party/spirv-headers third_party/spirv-tools tools/clang

Change-Id: I703d7bf7ad81bc6190e45a5271a30bc7110f4cb7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24401
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
dan sinclair 2020-07-06 19:50:42 +00:00
parent 91cb60f2ec
commit 6249e38189
3 changed files with 3 additions and 5 deletions

2
DEPS
View File

@ -10,7 +10,7 @@ vars = {
'clang_revision': 'b49c12a8f3fb25181855d0ea641bbcc2b2e95213',
'cpplint_revision': '305ac8725a166ed42e3f5dd3f80d6de2cf840ef1',
'googletest_revision': '356f2d264a485db2fcc50ec1c672e0d37b6cb39b',
'spirv_headers_revision': '11d7637e7a43cd88cfd4e42c99581dcb682936aa',
'spirv_headers_revision': '308bd07424350a6000f35a77b5f85cd4f3da319e',
'spirv_tools_revision': 'bd2a9ea85210d3bb474bc5adb9ff4b0bb536b4fc',
'testing_revision': 'a711b1132571869bdd7084c86083698671b290a6',
}

View File

@ -21,9 +21,7 @@ namespace writer {
namespace spirv {
namespace {
// TODO(dsinclair): Reserve a generator ID for Tint.
// https://github.com/KhronosGroup/SPIRV-Headers/blob/master/include/spirv/spir-v.xml#L75
const uint32_t kGeneratorId = 0;
const uint32_t kGeneratorId = 23u << 16;
} // namespace

View File

@ -37,7 +37,7 @@ TEST_F(BinaryWriterTest, Preamble) {
ASSERT_EQ(res.size(), 5u);
EXPECT_EQ(res[0], spv::MagicNumber);
EXPECT_EQ(res[1], 0x00010300u); // SPIR-V 1.3
EXPECT_EQ(res[2], 0u); // Generator ID
EXPECT_EQ(res[2], 23u << 16); // Generator ID
EXPECT_EQ(res[3], 5u); // ID Bound
EXPECT_EQ(res[4], 0u); // Reserved
}