spir-reader: fix tests: struct with BuiltIns must have Block

Fixes https://github.com/dneto0/spirv-samples/issues/2

Change-Id: Ie3ab62f31ba7e3d7c8d4dd56f8dc9a87046e1b92
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/73241
Auto-Submit: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
David Neto 2021-12-16 22:07:51 +00:00 committed by Tint LUCI CQ
parent 11d9a08287
commit 188b1fb8f5
1 changed files with 2 additions and 0 deletions

View File

@ -270,6 +270,7 @@ std::string PerVertexPreamble() {
OpMemoryModel Logical Simple OpMemoryModel Logical Simple
OpEntryPoint Vertex %main "main" %1 OpEntryPoint Vertex %main "main" %1
OpDecorate %10 Block
OpMemberDecorate %10 0 BuiltIn Position OpMemberDecorate %10 0 BuiltIn Position
OpMemberDecorate %10 1 BuiltIn PointSize OpMemberDecorate %10 1 BuiltIn PointSize
OpMemberDecorate %10 2 BuiltIn ClipDistance OpMemberDecorate %10 2 BuiltIn ClipDistance
@ -4116,6 +4117,7 @@ TEST_F(SpvModuleScopeVarParserTest,
OpMemoryModel Logical Simple OpMemoryModel Logical Simple
OpEntryPoint Vertex %main "main" %1 OpEntryPoint Vertex %main "main" %1
OpDecorate %10 Block
OpMemberDecorate %10 0 BuiltIn Position OpMemberDecorate %10 0 BuiltIn Position
OpMemberDecorate %10 1 BuiltIn PointSize OpMemberDecorate %10 1 BuiltIn PointSize
OpMemberDecorate %10 2 BuiltIn ClipDistance OpMemberDecorate %10 2 BuiltIn ClipDistance