Debian Codegraph @

src/gpu/graphite/vk/VulkanSpirvTransforms.h

raw
1 /*
2 * Copyright 2025 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 skgpu_graphite_VulkanSpirvTransforms_DEFINED
9 #define skgpu_graphite_VulkanSpirvTransforms_DEFINED
10
11 #include "src/sksl/codegen/SkSLNativeShader.h"
12
13 namespace skgpu::graphite {
14
15 /*
16 * The SPIR-V transformer is capable of applying multiple transformations in one pass. However,
17 * there is currently only one transformation needed. The SPIRVTransformOptions controls which
18 * transformations to apply, and is provided for extensibility.
19 */
20 struct SPIRVTransformOptions {
21 // Adjust the SPIR-V to support loading from input attachments when multisampled.
22 bool fMultisampleInputLoad = false;
23 };
24
25 SkSL::NativeShader TransformSPIRV(const SkSL::NativeShader& spirv,
26 const SPIRVTransformOptions& options);
27
28 } // namespace skgpu::graphite
29
30 #endif // skgpu_graphite_VulkanSpirvTransforms_DEFINED