| 31 | namespace { |
| 32 | |
| 33 | TEST(ReplayerTest, PartialReplay) { |
| 34 | const std::string kTestShader = R"( |
| 35 | OpCapability Shader |
| 36 | %1 = OpExtInstImport "GLSL.std.450" |
| 37 | OpMemoryModel Logical GLSL450 |
| 38 | OpEntryPoint Fragment %4 "main" |
| 39 | OpExecutionMode %4 OriginUpperLeft |
| 40 | OpSource ESSL 310 |
| 41 | OpName %4 "main" |
| 42 | OpName %8 "g" |
| 43 | OpName %11 "x" |
| 44 | %2 = OpTypeVoid |
| 45 | %3 = OpTypeFunction %2 |
| 46 | %6 = OpTypeInt 32 1 |
| 47 | %7 = OpTypePointer Private %6 |
| 48 | %8 = OpVariable %7 Private |
| 49 | %9 = OpConstant %6 10 |
| 50 | %10 = OpTypePointer Function %6 |
| 51 | %4 = OpFunction %2 None %3 |
| 52 | %5 = OpLabel |
| 53 | %11 = OpVariable %10 Function |
| 54 | OpStore %8 %9 |
| 55 | %12 = OpLoad %6 %8 |
| 56 | OpStore %11 %12 |
| 57 | %13 = OpLoad %6 %8 |
| 58 | OpStore %11 %13 |
| 59 | %14 = OpLoad %6 %8 |
| 60 | OpStore %11 %14 |
| 61 | %15 = OpLoad %6 %8 |
| 62 | OpStore %11 %15 |
| 63 | %16 = OpLoad %6 %8 |
| 64 | OpStore %11 %16 |
| 65 | %17 = OpLoad %6 %8 |
| 66 | OpStore %11 %17 |
| 67 | %18 = OpLoad %6 %8 |
| 68 | OpStore %11 %18 |
| 69 | %19 = OpLoad %6 %8 |
| 70 | OpStore %11 %19 |
| 71 | %20 = OpLoad %6 %8 |
| 72 | OpStore %11 %20 |
| 73 | %21 = OpLoad %6 %8 |
| 74 | OpStore %11 %21 |
| 75 | %22 = OpLoad %6 %8 |
| 76 | OpStore %11 %22 |
| 77 | OpReturn |
| 78 | OpFunctionEnd |
| 79 | )"; |
| 80 | |
| 81 | const auto env = SPV_ENV_UNIVERSAL_1_3; |
| 82 | spvtools::ValidatorOptions validator_options; |
| 83 | |
| 84 | std::vector<uint32_t> binary_in; |
| 85 | SpirvTools t(env); |
| 86 | t.SetMessageConsumer(kConsoleMessageConsumer); |
| 87 | ASSERT_TRUE(t.Assemble(kTestShader, &binary_in, kFuzzAssembleOption)); |
| 88 | ASSERT_TRUE(t.Validate(binary_in)); |
| 89 | |
| 90 | protobufs::TransformationSequence transformations; |
nothing calls this directly
no test coverage detected