Move code generators to codegen/ directory.
We are up to having seven distinct types of codegen, and will soon have an 8th (DSL C++). Change-Id: I6758328390c234ba1d5c30c118199dbc820af52a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395817 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
da2b0f43a2
commit
3738ef531b
@ -7,7 +7,7 @@
|
||||
|
||||
#include "src/gpu/GrShaderCaps.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLVarDeclarations.h"
|
||||
#include "src/sksl/ir/SkSLVariable.h"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "modules/particles/include/SkParticleEffect.h"
|
||||
#include "modules/particles/include/SkParticleSerialization.h"
|
||||
#include "modules/skresources/include/SkResources.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
#include "tools/Resources.h"
|
||||
|
||||
struct UniformValue {
|
||||
|
35
gn/sksl.gni
35
gn/sksl.gni
@ -73,8 +73,8 @@ skia_sksl_sources = [
|
||||
"$_src/sksl/SkSLStringStream.h",
|
||||
"$_src/sksl/SkSLUtil.cpp",
|
||||
"$_src/sksl/SkSLUtil.h",
|
||||
"$_src/sksl/SkSLVMGenerator.cpp",
|
||||
"$_src/sksl/SkSLVMGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLVMCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLVMCodeGenerator.h",
|
||||
"$_src/sksl/dsl/DSLBlock.cpp",
|
||||
"$_src/sksl/dsl/DSLCase.cpp",
|
||||
"$_src/sksl/dsl/DSLCore.cpp",
|
||||
@ -173,26 +173,27 @@ skia_sksl_sources = [
|
||||
"$_src/sksl/ir/SkSLVariable.h",
|
||||
"$_src/sksl/ir/SkSLVariableReference.cpp",
|
||||
"$_src/sksl/ir/SkSLVariableReference.h",
|
||||
"$_src/sksl/spirv.h",
|
||||
]
|
||||
|
||||
skia_sksl_gpu_sources = [
|
||||
"$_src/sksl/SkSLCPPCodeGenerator.cpp",
|
||||
"$_src/sksl/SkSLCPPCodeGenerator.h",
|
||||
"$_src/sksl/SkSLCPPUniformCTypes.cpp",
|
||||
"$_src/sksl/SkSLCPPUniformCTypes.h",
|
||||
"$_src/sksl/SkSLCodeGenerator.h",
|
||||
"$_src/sksl/SkSLGLSLCodeGenerator.cpp",
|
||||
"$_src/sksl/SkSLGLSLCodeGenerator.h",
|
||||
"$_src/sksl/SkSLHCodeGenerator.cpp",
|
||||
"$_src/sksl/SkSLHCodeGenerator.h",
|
||||
"$_src/sksl/SkSLMetalCodeGenerator.cpp",
|
||||
"$_src/sksl/SkSLMetalCodeGenerator.h",
|
||||
"$_src/sksl/SkSLPipelineStageCodeGenerator.cpp",
|
||||
"$_src/sksl/SkSLPipelineStageCodeGenerator.h",
|
||||
"$_src/sksl/SkSLSPIRVCodeGenerator.cpp",
|
||||
"$_src/sksl/SkSLSPIRVCodeGenerator.h",
|
||||
"$_src/sksl/SkSLSPIRVtoHLSL.cpp",
|
||||
"$_src/sksl/SkSLSPIRVtoHLSL.h",
|
||||
"$_src/sksl/codegen/SkSLCPPCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLCPPCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLGLSLCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLGLSLCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLHCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLHCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLMetalCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLMetalCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLPipelineStageCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp",
|
||||
"$_src/sksl/codegen/SkSLSPIRVCodeGenerator.h",
|
||||
"$_src/sksl/codegen/SkSLSPIRVtoHLSL.cpp",
|
||||
"$_src/sksl/codegen/SkSLSPIRVtoHLSL.h",
|
||||
]
|
||||
|
||||
skia_gpu_processor_sources = [
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "modules/particles/include/SkParticleEffect.h"
|
||||
#include "modules/particles/include/SkParticleSerialization.h"
|
||||
#include "modules/skresources/include/SkResources.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "src/core/SkVM.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLUtil.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
|
||||
// Cached state for a single program (either all Effect code, or all Particle code)
|
||||
struct SkParticleProgram {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "src/sksl/SkSLAnalysis.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLUtil.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLFunctionDefinition.h"
|
||||
#include "src/sksl/ir/SkSLVarDeclarations.h"
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include "src/gpu/GrBaseContextPriv.h"
|
||||
#include "src/gpu/GrColorInfo.h"
|
||||
#include "src/gpu/GrTexture.h"
|
||||
#include "src/sksl/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/SkSLUtil.h"
|
||||
#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLVarDeclarations.h"
|
||||
|
||||
#include "src/gpu/glsl/GrGLSLFragmentProcessor.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "src/gpu/gl/GrGLGpu.h"
|
||||
#include "src/gpu/gl/builders/GrGLShaderStringBuilder.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLProgram.h"
|
||||
|
||||
// Print the source code for all shaders generated.
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "include/gpu/GrContextOptions.h"
|
||||
#include "src/gpu/GrGpu.h"
|
||||
#include "src/gpu/gl/GrGLContext.h"
|
||||
#include "src/sksl/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
|
||||
|
||||
std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLGpu* gpu,
|
||||
SkSL::ProgramKind programKind,
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include "src/sksl/SkSLCPPUniformCTypes.h"
|
||||
|
||||
#include "include/private/SkMutex.h"
|
||||
#include "src/sksl/SkSLHCodeGenerator.h"
|
||||
#include "src/sksl/SkSLStringStream.h"
|
||||
#include "src/sksl/codegen/SkSLHCodeGenerator.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
@ -13,17 +13,17 @@
|
||||
#include "src/core/SkScopeExit.h"
|
||||
#include "src/core/SkTraceEvent.h"
|
||||
#include "src/sksl/SkSLAnalysis.h"
|
||||
#include "src/sksl/SkSLCPPCodeGenerator.h"
|
||||
#include "src/sksl/SkSLConstantFolder.h"
|
||||
#include "src/sksl/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/SkSLHCodeGenerator.h"
|
||||
#include "src/sksl/SkSLIRGenerator.h"
|
||||
#include "src/sksl/SkSLMetalCodeGenerator.h"
|
||||
#include "src/sksl/SkSLOperators.h"
|
||||
#include "src/sksl/SkSLProgramSettings.h"
|
||||
#include "src/sksl/SkSLRehydrator.h"
|
||||
#include "src/sksl/SkSLSPIRVCodeGenerator.h"
|
||||
#include "src/sksl/SkSLSPIRVtoHLSL.h"
|
||||
#include "src/sksl/codegen/SkSLCPPCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLHCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLMetalCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLSPIRVCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLSPIRVtoHLSL.h"
|
||||
#include "src/sksl/ir/SkSLEnum.h"
|
||||
#include "src/sksl/ir/SkSLExpression.h"
|
||||
#include "src/sksl/ir/SkSLExpressionStatement.h"
|
||||
|
@ -14,10 +14,10 @@
|
||||
#include "src/sksl/SkSLDehydrator.h"
|
||||
#include "src/sksl/SkSLFileOutputStream.h"
|
||||
#include "src/sksl/SkSLIRGenerator.h"
|
||||
#include "src/sksl/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/SkSLStringStream.h"
|
||||
#include "src/sksl/SkSLUtil.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLEnum.h"
|
||||
#include "src/sksl/ir/SkSLUnresolvedFunction.h"
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLCPPCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLCPPCodeGenerator.h"
|
||||
|
||||
#include "include/private/SkSLSampleUsage.h"
|
||||
#include "src/sksl/SkSLAnalysis.h"
|
||||
#include "src/sksl/SkSLCPPUniformCTypes.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLHCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLHCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLEnum.h"
|
||||
|
||||
#include <algorithm>
|
@ -8,8 +8,8 @@
|
||||
#ifndef SKSL_CPPCODEGENERATOR
|
||||
#define SKSL_CPPCODEGENERATOR
|
||||
|
||||
#include "src/sksl/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/SkSLSectionAndParameterHelper.h"
|
||||
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
|
||||
|
||||
#include <set>
|
||||
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLGLSLCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLGLSLCodeGenerator.h"
|
||||
|
||||
#include <memory>
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
#include "include/private/SkSLProgramElement.h"
|
||||
#include "include/private/SkSLStatement.h"
|
||||
#include "src/sksl/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/SkSLOperators.h"
|
||||
#include "src/sksl/SkSLStringStream.h"
|
||||
#include "src/sksl/codegen/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLBinaryExpression.h"
|
||||
#include "src/sksl/ir/SkSLBoolLiteral.h"
|
||||
#include "src/sksl/ir/SkSLConstructor.h"
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLHCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLHCodeGenerator.h"
|
||||
|
||||
#include "include/private/SkSLSampleUsage.h"
|
||||
#include "src/sksl/SkSLAnalysis.h"
|
@ -8,7 +8,8 @@
|
||||
#ifndef SKSL_HCODEGENERATOR
|
||||
#define SKSL_HCODEGENERATOR
|
||||
|
||||
#include "src/sksl/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLCodeGenerator.h"
|
||||
|
||||
#include "src/sksl/SkSLSectionAndParameterHelper.h"
|
||||
#include "src/sksl/ir/SkSLType.h"
|
||||
#include "src/sksl/ir/SkSLVariable.h"
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLMetalCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLMetalCodeGenerator.h"
|
||||
|
||||
#include "src/core/SkScopeExit.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
@ -16,9 +16,9 @@
|
||||
|
||||
#include "include/private/SkSLProgramElement.h"
|
||||
#include "include/private/SkSLStatement.h"
|
||||
#include "src/sksl/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/SkSLOperators.h"
|
||||
#include "src/sksl/SkSLStringStream.h"
|
||||
#include "src/sksl/codegen/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLBinaryExpression.h"
|
||||
#include "src/sksl/ir/SkSLBoolLiteral.h"
|
||||
#include "src/sksl/ir/SkSLConstructor.h"
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLPipelineStageCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h"
|
||||
|
||||
#include "include/private/SkSLProgramElement.h"
|
||||
#include "include/private/SkSLStatement.h"
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLSPIRVCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLSPIRVCodeGenerator.h"
|
||||
|
||||
#include "src/sksl/GLSL.std.450.h"
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include "include/private/SkSLProgramElement.h"
|
||||
#include "include/private/SkSLStatement.h"
|
||||
#include "src/core/SkOpts.h"
|
||||
#include "src/sksl/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/SkSLMemoryLayout.h"
|
||||
#include "src/sksl/SkSLStringStream.h"
|
||||
#include "src/sksl/codegen/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLBinaryExpression.h"
|
||||
#include "src/sksl/ir/SkSLBoolLiteral.h"
|
||||
#include "src/sksl/ir/SkSLConstructor.h"
|
@ -5,7 +5,7 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "src/sksl/SkSLSPIRVtoHLSL.h"
|
||||
#include "src/sksl/codegen/SkSLSPIRVtoHLSL.h"
|
||||
|
||||
#if defined(SK_DIRECT3D)
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include "include/private/SkSLStatement.h"
|
||||
#include "include/private/SkTArray.h"
|
||||
#include "include/private/SkTPin.h"
|
||||
#include "src/sksl/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLOperators.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLCodeGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLBinaryExpression.h"
|
||||
#include "src/sksl/ir/SkSLBlock.h"
|
||||
#include "src/sksl/ir/SkSLBoolLiteral.h"
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "include/core/SkM44.h"
|
||||
#include "src/sksl/SkSLCompiler.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
#include "src/sksl/ir/SkSLExternalFunction.h"
|
||||
#include "src/utils/SkJSON.h"
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "modules/particles/include/SkReflected.h"
|
||||
#include "modules/skresources/include/SkResources.h"
|
||||
#include "src/core/SkOSFile.h"
|
||||
#include "src/sksl/SkSLVMGenerator.h"
|
||||
#include "src/sksl/codegen/SkSLVMCodeGenerator.h"
|
||||
#include "src/utils/SkOSPath.h"
|
||||
#include "tools/Resources.h"
|
||||
#include "tools/ToolUtils.h"
|
||||
|
Loading…
Reference in New Issue
Block a user