93 {
94
95
97
98
99 "sksl/errors/InvalidBackendBindingFlagsGL.sksl",
100 "sksl/errors/InvalidThreadgroupRTS.rts",
101 "sksl/errors/LastFragColorWithoutCaps.sksl",
102 "sksl/errors/MeshFragmentWithShader.mfrag",
103 "sksl/errors/MeshFragmentWithBlender.mfrag",
104 "sksl/errors/MeshFragmentWithColorFilter.mfrag",
105 "sksl/errors/StaticIfTest.sksl",
106 "sksl/errors/StaticSwitchConditionalBreak.sksl",
107 "sksl/errors/StaticSwitchTest.sksl",
108 "sksl/errors/StaticSwitchWithConditionalBreak.sksl",
109 "sksl/errors/StaticSwitchWithConditionalContinue.sksl",
110 "sksl/errors/StaticSwitchWithConditionalReturn.sksl",
111
112 "sksl/errors/ComputeUniform.compute",
113 "sksl/errors/DuplicateBinding.compute",
114 "sksl/errors/InvalidThreadgroupCompute.compute",
115 "sksl/errors/UnspecifiedBinding.compute",
116
117 "sksl/runtime_errors/ReservedNameISampler2D.rts",
118
119#ifdef SK_ENABLE_OPTIMIZE_SIZE
120 "sksl/errors/ArrayInlinedIndexOutOfRange.sksl",
121 "sksl/errors/MatrixInlinedIndexOutOfRange.sksl",
122 "sksl/errors/OverflowInlinedLiteral.sksl",
123 "sksl/errors/VectorInlinedIndexOutOfRange.sksl",
124#endif
125 }};
126 if (kTestsToSkip->contains(testFile)) {
127 INFOF(r,
"%s: skipped in SK_ENABLE_OPTIMIZE_SIZE mode", testFile);
128 return;
129 }
130
132 if (!shaderData) {
134 return;
135 }
136
137 std::string shaderString{
reinterpret_cast<const char*
>(shaderData->
bytes()),
139
141
142
145 std::unique_ptr<SkSL::Program> program =
compiler.convertProgram(kind, std::move(shaderString),
147
148
149 if (program) {
150 ERRORF(r,
"%s: Expected failure, but compiled successfully",
152 return;
153 }
154
156}
sk_sp< SkData > GetResourceAsData(const char *resource)
static void check_expected_errors(skiatest::Reporter *r, const char *testFile, const std::vector< std::string > &expectedErrors, std::string reportedErrors)
static std::vector< std::string > get_expected_errors(const char *shaderString)
#define INFOF(REPORTER,...)
const uint8_t * bytes() const