Debian Codegraph @

src/sksl/codegen/SkSLSPIRVValidator.h

raw
1 /*
2 * Copyright 2024 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SKSL_SPIRVVALIDATOR
9 #define SKSL_SPIRVVALIDATOR
10
11 #include "include/core/SkSpan.h"
12
13 #include <cstdint>
14
15 namespace SkSL {
16
17 class ErrorReporter;
18
19 // SPIRV issues will cause an SkDEBUGFAILF to be triggered with the error message
20 // and false will be returned (i.e. invalid SPIRV is a fatal issue in debug builds).
21 bool ValidateSPIRV(ErrorReporter&, SkSpan<const uint32_t>);
22
23 // SPIRV issues will be sent to the provided ErrorReporter along with a disassembly
24 // of the code. This will also return false, but not be fatal in debug builds.
25 bool ValidateSPIRVAndDissassemble(ErrorReporter&, SkSpan<const uint32_t>);
26
27 } // namespace SkSL
28
29 #endif