Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: tests/SkSLErrorTest.cpp

Issue 2509673002: Revert of added support for push_constant layout (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/sksl/ir/SkSLType.h ('k') | tests/SkSLGLSLTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkSLCompiler.h" 8 #include "SkSLCompiler.h"
9 9
10 #include "Test.h" 10 #include "Test.h"
11 11
12 #if SK_SUPPORT_GPU 12 #if SKIA_SUPPORT_GPU
13 13
14 static void test_failure(skiatest::Reporter* r, const char* src, const char* err or) { 14 static void test_failure(skiatest::Reporter* r, const char* src, const char* err or) {
15 SkSL::Compiler compiler; 15 SkSL::Compiler compiler;
16 std::stringstream out; 16 std::stringstream out;
17 bool result = compiler.toSPIRV(SkSL::Program::kFragment_Kind, src, out); 17 bool result = compiler.toSPIRV(SkSL::Program::kFragment_Kind, src, out);
18 if (compiler.errorText() != error) { 18 if (compiler.errorText() != error) {
19 SkDebugf("SKSL ERROR:\n source: %s\n expected: %s received: %s" , src, error, 19 SkDebugf("SKSL ERROR:\n source: %s\n expected: %s received: %s" , src, error,
20 compiler.errorText().c_str()); 20 compiler.errorText().c_str());
21 } 21 }
22 REPORTER_ASSERT(r, !result); 22 REPORTER_ASSERT(r, !result);
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 "error: 1: unknown identifier 'x'\n1 error\n"); 365 "error: 1: unknown identifier 'x'\n1 error\n");
366 test_failure(r, 366 test_failure(r,
367 "void foo() { true ? 5 : x; }", 367 "void foo() { true ? 5 : x; }",
368 "error: 1: unknown identifier 'x'\n1 error\n"); 368 "error: 1: unknown identifier 'x'\n1 error\n");
369 test_failure(r, 369 test_failure(r,
370 "void foo() { false ? x : 5; }", 370 "void foo() { false ? x : 5; }",
371 "error: 1: unknown identifier 'x'\n1 error\n"); 371 "error: 1: unknown identifier 'x'\n1 error\n");
372 } 372 }
373 373
374 #endif 374 #endif
OLDNEW
« no previous file with comments | « src/sksl/ir/SkSLType.h ('k') | tests/SkSLGLSLTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698