/third_party/skia/src/sksl/ |
H A D | SkSLMain.cpp | 51 static std::unique_ptr<SkWStream> as_SkWStream(SkSL::OutputStream& s) { in as_SkWStream() 54 Adapter(SkSL::OutputStream& out) : fOut(out), fBytesWritten(0) {} in as_SkWStream() 65 SkSL::OutputStream& fOut; in as_SkWStream() 75 static SkSL::String base_name(const SkSL::String& fpPath, const char* prefix, const char* suffix) { in base_name() 76 SkSL::String result; in base_name() 90 // Given a string containing an SkSL program, searches for a #pragma settings comment, like so: 93 static bool detect_shader_settings(const SkSL::String& text, in detect_shader_settings() 94 SkSL::Program::Settings* settings, in detect_shader_settings() 95 const SkSL in detect_shader_settings() [all...] |
H A D | SkSLThreadContext.h | 21 namespace SkSL { namespace 39 * Thread-safe class that tracks per-thread state associated with SkSL output. 43 ThreadContext(SkSL::Compiler* compiler, SkSL::ProgramKind kind, 44 const SkSL::ProgramSettings& settings, SkSL::ParsedModule module, bool isModule); 56 static SkSL::Compiler& Compiler() { return *Instance().fCompiler; } in Compiler() 61 static SkSL::Context& Context(); 66 static SkSL::ProgramSettings& Settings(); 71 static SkSL [all...] |
/third_party/skia/tests/ |
H A D | SkSLMemoryLayoutTest.cpp | 16 SkSL::TestingOnly_AbortErrorReporter errors; in DEF_TEST() 18 SkSL::Mangler mangler; in DEF_TEST() 19 SkSL::Context context(errors, caps, mangler); in DEF_TEST() 20 SkSL::MemoryLayout layout(SkSL::MemoryLayout::k140_Standard); in DEF_TEST() 59 std::vector<SkSL::Type::Field> fields1; in DEF_TEST() 60 fields1.emplace_back(SkSL::Modifiers(), skstd::string_view("a"), in DEF_TEST() 62 std::unique_ptr<SkSL::Type> s1 = SkSL::Type::MakeStructType(-1, SkSL in DEF_TEST() [all...] |
H A D | SkSLInterpreterTest.cpp | 19 SkSL::Program::Settings settings; in ProgramBuilder() 20 // The SkSL inliner is well tested in other contexts. Here, we disable inlining entirely, in ProgramBuilder() 26 fProgram = fCompiler.convertProgram(SkSL::ProgramKind::kGeneric, SkSL::String(src), in ProgramBuilder() 34 SkSL::Program& operator*() { return *fProgram; } in operator *() 37 SkSL::Compiler fCompiler; 38 std::unique_ptr<SkSL::Program> fProgram; 86 const SkSL::FunctionDefinition* main = SkSL::Program_GetFunction(*program, "main"); in test() 90 SkSL in test() [all...] |
H A D | SkSLMetalTestbed.cpp | 15 SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) { in test() 16 SkSL::Compiler compiler(&caps); in test() 17 SkSL::Program::Settings settings; in test() 18 SkSL::String output; in test() 19 std::unique_ptr<SkSL::Program> program = compiler.convertProgram(kind, SkSL::String(src), in test() 32 // Add in your SkSL here. in DEF_TEST() 34 *SkSL::ShaderCapsFactory::Default(), in DEF_TEST() 12 test(skiatest::Reporter* r, const GrShaderCaps& caps, const char* src, SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) test() argument
|
H A D | SkSLGLSLTestbed.cpp | 15 SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) { in test() 16 SkSL::Compiler compiler(&caps); in test() 17 SkSL::Program::Settings settings; in test() 18 SkSL::String output; in test() 19 std::unique_ptr<SkSL::Program> program = compiler.convertProgram(kind, SkSL::String(src), in test() 32 // Add in your SkSL here. in DEF_TEST() 34 *SkSL::ShaderCapsFactory::Default(), in DEF_TEST() 12 test(skiatest::Reporter* r, const GrShaderCaps& caps, const char* src, SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) test() argument
|
H A D | SkSLSPIRVTestbed.cpp | 15 SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) { in test() 16 SkSL::Compiler compiler(&caps); in test() 17 SkSL::Program::Settings settings; in test() 18 SkSL::String output; in test() 19 std::unique_ptr<SkSL::Program> program = compiler.convertProgram(kind, SkSL::String(src), in test() 30 // Add in your SkSL here. in DEF_TEST() 32 *SkSL::ShaderCapsFactory::Default(), in DEF_TEST() 12 test(skiatest::Reporter* r, const GrShaderCaps& caps, const char* src, SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) test() argument
|
H A D | SkSLDSLTest.cpp | 23 using namespace SkSL::dsl; 25 SkSL::ProgramSettings default_settings() { in default_settings() 26 SkSL::ProgramSettings result; in default_settings() 32 SkSL::ProgramSettings no_mark_vars_declared() { in no_mark_vars_declared() 33 SkSL::ProgramSettings result = default_settings(); in no_mark_vars_declared() 47 AutoDSLContext(GrGpu* gpu, SkSL::ProgramSettings settings = default_settings(), in AutoDSLContext() argument 48 SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) { in AutoDSLContext() 57 class ExpectError : public SkSL::ErrorReporter { 72 void handleError(skstd::string_view msg, SkSL [all...] |
/third_party/skia/bench/ |
H A D | SkSLBench.cpp | 30 SkSL::Compiler compiler(&caps); 56 SkSLCompileBench(SkSL::String name, const char* src, bool optimize, Output output) in SkSLCompileBench() 57 : fName(SkSL::String("sksl_") + (optimize ? "" : "unoptimized_") + output_string(output) + in SkSLCompileBench() 81 std::unique_ptr<SkSL::Program> program = SkSL::DSLParser(&fCompiler, 83 SkSL::ProgramKind::kFragment, 88 SkSL::String result; 99 SkSL::String fName; 100 SkSL::String fSrc; 102 SkSL [all...] |
/third_party/skia/include/sksl/ |
H A D | DSLLayout.h | 16 namespace SkSL { namespace 25 return this->flag(SkSL::Layout::kOriginUpperLeft_Flag, "origin_upper_left", pos); in originUpperLeft() 29 return this->flag(SkSL::Layout::kPushConstant_Flag, "push_constant", pos); in pushConstant() 33 return this->flag(SkSL::Layout::kBlendSupportAllEquations_Flag, in blendSupportAllEquations() 38 return this->flag(SkSL::Layout::kSRGBUnpremul_Flag, "srgb_unpremul", pos); in srgbUnpremul() 42 return this->intValue(&fSkSLLayout.fLocation, location, SkSL::Layout::kLocation_Flag, in location() 47 return this->intValue(&fSkSLLayout.fOffset, offset, SkSL::Layout::kOffset_Flag, "offset", in offset() 52 return this->intValue(&fSkSLLayout.fBinding, binding, SkSL::Layout::kBinding_Flag, in binding() 57 return this->intValue(&fSkSLLayout.fIndex, index, SkSL::Layout::kIndex_Flag, "index", pos); in index() 61 return this->intValue(&fSkSLLayout.fSet, set, SkSL in set() [all...] |
H A D | DSLModifiers.h | 15 namespace SkSL { namespace 23 kNo_Modifier = SkSL::Modifiers::kNo_Flag, 24 kConst_Modifier = SkSL::Modifiers::kConst_Flag, 25 kIn_Modifier = SkSL::Modifiers::kIn_Flag, 26 kOut_Modifier = SkSL::Modifiers::kOut_Flag, 27 kInOut_Modifier = SkSL::Modifiers::kIn_Flag | SkSL::Modifiers::kOut_Flag, 28 kUniform_Modifier = SkSL::Modifiers::kUniform_Flag, 29 kFlat_Modifier = SkSL::Modifiers::kFlat_Flag, 30 kNoPerspective_Modifier = SkSL [all...] |
H A D | DSLStatement.h | 20 namespace SkSL { namespace 47 DSLStatement(std::unique_ptr<SkSL::Statement> stmt); 49 DSLStatement(std::unique_ptr<SkSL::Expression> expr); 57 std::unique_ptr<SkSL::Statement> release() { in release() 63 std::unique_ptr<SkSL::Statement> releaseIfPossible() { in releaseIfPossible() 67 std::unique_ptr<SkSL::Statement> fStatement; 87 DSLPossibleStatement(std::unique_ptr<SkSL::Statement> stmt); 95 std::unique_ptr<SkSL::Statement> release() { in release() 100 std::unique_ptr<SkSL::Statement> fStatement; 109 } // namespace SkSL [all...] |
/third_party/skia/fuzz/oss_fuzz/ |
H A D | FuzzSKSL2Pipeline.cpp | 17 std::unique_ptr<GrShaderCaps> caps = SkSL::ShaderCapsFactory::Default(); in FuzzSKSL2Pipeline() 18 SkSL::Compiler compiler(caps.get()); in FuzzSKSL2Pipeline() 19 SkSL::Program::Settings settings; in FuzzSKSL2Pipeline() 20 std::unique_ptr<SkSL::Program> program = compiler.convertProgram( in FuzzSKSL2Pipeline() 21 SkSL::ProgramKind::kRuntimeShader, in FuzzSKSL2Pipeline() 22 SkSL::String((const char*) bytes->data(), in FuzzSKSL2Pipeline() 29 class Callbacks : public SkSL::PipelineStage::Callbacks { in FuzzSKSL2Pipeline() 30 using String = SkSL::String; in FuzzSKSL2Pipeline() 32 String declareUniform(const SkSL::VarDeclaration* decl) override { in FuzzSKSL2Pipeline() 42 return "child_" + SkSL in FuzzSKSL2Pipeline() [all...] |
H A D | FuzzSKSL2Metal.cpp | 14 std::unique_ptr<GrShaderCaps> caps = SkSL::ShaderCapsFactory::Default(); in FuzzSKSL2Metal() 15 SkSL::Compiler compiler(caps.get()); in FuzzSKSL2Metal() 16 SkSL::String output; in FuzzSKSL2Metal() 17 SkSL::Program::Settings settings; in FuzzSKSL2Metal() 18 std::unique_ptr<SkSL::Program> program = compiler.convertProgram( in FuzzSKSL2Metal() 19 SkSL::ProgramKind::kFragment, in FuzzSKSL2Metal() 20 SkSL::String((const char*) bytes->data(), in FuzzSKSL2Metal()
|
H A D | FuzzSKSL2GLSL.cpp | 14 std::unique_ptr<GrShaderCaps> caps = SkSL::ShaderCapsFactory::Default(); in FuzzSKSL2GLSL() 15 SkSL::Compiler compiler(caps.get()); in FuzzSKSL2GLSL() 16 SkSL::String output; in FuzzSKSL2GLSL() 17 SkSL::Program::Settings settings; in FuzzSKSL2GLSL() 18 std::unique_ptr<SkSL::Program> program = compiler.convertProgram( in FuzzSKSL2GLSL() 19 SkSL::ProgramKind::kFragment, in FuzzSKSL2GLSL() 20 SkSL::String((const char*) bytes->data(), in FuzzSKSL2GLSL()
|
H A D | FuzzSKSL2SPIRV.cpp | 14 std::unique_ptr<GrShaderCaps> caps = SkSL::ShaderCapsFactory::Default(); in FuzzSKSL2SPIRV() 15 SkSL::Compiler compiler(caps.get()); in FuzzSKSL2SPIRV() 16 SkSL::String output; in FuzzSKSL2SPIRV() 17 SkSL::Program::Settings settings; in FuzzSKSL2SPIRV() 26 std::unique_ptr<SkSL::Program> program = compiler.convertProgram( in FuzzSKSL2SPIRV() 27 SkSL::ProgramKind::kFragment, in FuzzSKSL2SPIRV() 28 SkSL::String((const char*) bytes->data(), in FuzzSKSL2SPIRV()
|
/third_party/skia/src/sksl/dsl/priv/ |
H A D | DSLWriter.cpp | 20 namespace SkSL { namespace 38 const SkSL::Variable* DSLWriter::Var(DSLVarBase& var) { in Var() 46 if (var.storage() != SkSL::VariableStorage::kParameter) { in Var() 47 const SkSL::Type* baseType = &var.fType.skslType(); in Var() 52 std::unique_ptr<SkSL::Variable> skslvar = SkSL::Variable::Convert(ThreadContext::Context(), in Var() 55 SkSL::Variable* varPtr = skslvar.get(); in Var() 56 if (var.storage() != SkSL::VariableStorage::kParameter) { in Var() 69 std::unique_ptr<SkSL::Variable> DSLWriter::CreateParameterVar(DSLParameter& var) { in CreateParameterVar() 73 return SkSL in CreateParameterVar() [all...] |
/third_party/skia/src/gpu/ |
H A D | GrShaderUtils.cpp | 19 SkSL::String prettify(const SkSL::String& string) { in prettify() 179 SkSL::String fPretty; 187 SkSL::String PrettyPrint(const SkSL::String& string) { in PrettyPrint() 192 void VisitLineByLine(const SkSL::String& text, in VisitLineByLine() 201 SkSL::String BuildShaderErrorMessage(const char* shader, const char* errors) { in BuildShaderErrorMessage() 202 SkSL::String abortText{"Shader compilation error\n" in BuildShaderErrorMessage() 215 SkSL::String message = BuildShaderErrorMessage(shader, errors); in DefaultShaderErrorHandler() 227 void PrintShaderBanner(SkSL [all...] |
/third_party/skia/src/sksl/dsl/ |
H A D | DSLCore.cpp | 35 namespace SkSL { namespace 39 void Start(SkSL::Compiler* compiler, ProgramKind kind) { in Start() 43 void Start(SkSL::Compiler* compiler, ProgramKind kind, const ProgramSettings& settings) { in Start() 48 void StartModule(SkSL::Compiler* compiler, ProgramKind kind, const ProgramSettings& settings, in StartModule() 49 SkSL::ParsedModule baseModule) { in StartModule() 71 static std::unique_ptr<SkSL::Program> ReleaseProgram(std::unique_ptr<String> source) { in ReleaseProgram() 73 SkSL::Compiler& compiler = *instance.fCompiler; in ReleaseProgram() 74 const SkSL::Context& context = *compiler.fContext; in ReleaseProgram() 81 auto result = std::make_unique<SkSL::Program>(std::move(source), in ReleaseProgram() 124 SkSL in Call() [all...] |
H A D | DSLExpression.cpp | 30 namespace SkSL { namespace 39 DSLExpression::DSLExpression(std::unique_ptr<SkSL::Expression> expression) in DSLExpression() 45 : fExpression(SkSL::Literal::MakeFloat(ThreadContext::Context(), in DSLExpression() 58 : fExpression(SkSL::Literal::MakeInt(ThreadContext::Context(), in DSLExpression() 63 : fExpression(SkSL::Literal::MakeInt(ThreadContext::Context(), in DSLExpression() 68 : fExpression(SkSL::Literal::MakeInt(ThreadContext::Context(), in DSLExpression() 73 : fExpression(SkSL::Literal::MakeBool(ThreadContext::Context(), in DSLExpression() 78 fExpression = std::make_unique<SkSL::VariableReference>(pos.line(), DSLWriter::Var(var), in DSLExpression() 79 SkSL::VariableReference::RefKind::kRead); in DSLExpression() 90 fExpression = SkSL in DSLExpression() [all...] |
H A D | DSLType.cpp | 14 namespace SkSL { namespace 18 static const SkSL::Type* verify_type(const Context& context, in verify_type() 19 const SkSL::Type* type, in verify_type() 35 static const SkSL::Type* find_type(const Context& context, in find_type() 44 if (!symbol->is<SkSL::Type>()) { in find_type() 49 const SkSL::Type* type = &symbol->as<SkSL::Type>(); in find_type() 53 static const SkSL::Type* find_type(const Context& context, in find_type() 64 static const SkSL::Type* get_type_from_type_constant(const Context& context, TypeConstant tc) { in get_type_from_type_constant() 175 DSLType::DSLType(const SkSL [all...] |
/third_party/skia/src/gpu/gl/builders/ |
H A D | GrGLProgramBuilder.h | 28 SkSL::Program::Inputs inputs = SkSL::Program::Inputs()) in GrGLPrecompiledProgram() 33 SkSL::Program::Inputs fInputs; 58 SkSL::Compiler* shaderCompiler() const override; 63 void addInputVars(const SkSL::Program::Inputs& inputs); 64 bool compileAndAttachShaders(const SkSL::String& glsl, 73 void storeShaderInCache(const SkSL::Program::Inputs& inputs, GrGLuint programID, 74 const SkSL::String shaders[], bool isSkSL, 75 SkSL::Program::Settings* settings); 79 SkSL [all...] |
H A D | GrGLShaderStringBuilder.cpp | 21 std::unique_ptr<SkSL::Program> GrSkSLtoGLSL(const GrGLGpu* gpu, in GrSkSLtoGLSL() 22 SkSL::ProgramKind programKind, in GrSkSLtoGLSL() 23 const SkSL::String& sksl, in GrSkSLtoGLSL() 24 const SkSL::Program::Settings& settings, in GrSkSLtoGLSL() 25 SkSL::String* glsl, in GrSkSLtoGLSL() 27 SkSL::Compiler* compiler = gpu->shaderCompiler(); in GrSkSLtoGLSL() 28 std::unique_ptr<SkSL::Program> program; in GrSkSLtoGLSL() 30 SkSL::String src = GrShaderUtils::PrettyPrint(sksl); in GrSkSLtoGLSL() 32 const SkSL::String& src = sksl; in GrSkSLtoGLSL() 58 const SkSL in GrGLCompileAndAttachShader() [all...] |
/third_party/skia/src/gpu/vk/ |
H A D | GrVkPipelineStateBuilder.h | 42 SkSL::Compiler* shaderCompiler() const override; 57 void storeShadersInCache(const SkSL::String shaders[], const SkSL::Program::Inputs inputs[], 61 const SkSL::String& sksl, 64 const SkSL::Program::Settings& settings, 65 SkSL::String* outSPIRV, 66 SkSL::Program::Inputs* outInputs); 72 SkSL::String spirv, 73 SkSL::Program::Inputs inputs);
|
/third_party/skia/src/sksl/transform/ |
H A D | SkSLProgramWriter.h | 13 namespace SkSL { namespace 16 using Program = SkSL::Program; 17 using Expression = SkSL::Expression; 18 using Statement = SkSL::Statement; 19 using ProgramElement = SkSL::ProgramElement; 20 using UniquePtrExpression = std::unique_ptr<SkSL::Expression>; 21 using UniquePtrStatement = std::unique_ptr<SkSL::Statement>; 46 } // namespace SkSL
|