Home
last modified time | relevance | path

Searched refs:DSLWriter (Results 1 – 25 of 25) sorted by relevance

/external/skia/src/sksl/dsl/priv/
DDSLWriter.cpp34 DSLWriter::DSLWriter(SkSL::Compiler* compiler, SkSL::ProgramKind kind, int flags) in DSLWriter() function in SkSL::dsl::DSLWriter
60 DSLWriter::~DSLWriter() { in ~DSLWriter()
75 SkSL::IRGenerator& DSLWriter::IRGenerator() { in IRGenerator()
79 const SkSL::Context& DSLWriter::Context() { in Context()
83 const std::shared_ptr<SkSL::SymbolTable>& DSLWriter::SymbolTable() { in SymbolTable()
87 void DSLWriter::Reset() { in Reset()
94 const SkSL::Modifiers* DSLWriter::Modifiers(const SkSL::Modifiers& modifiers) { in Modifiers()
98 const char* DSLWriter::Name(const char* name) { in Name()
108 void DSLWriter::StartFragmentProcessor(GrGLSLFragmentProcessor* processor, in StartFragmentProcessor()
110 DSLWriter& instance = Instance(); in StartFragmentProcessor()
[all …]
DDSLFPs.cpp21 DSLWriter::StartFragmentProcessor(processor, emitArgs); in StartFragmentProcessor()
25 DSLWriter::EndFragmentProcessor(); in EndFragmentProcessor()
39 GrGLSLFragmentProcessor* proc = DSLWriter::CurrentProcessor(); in SampleChild()
40 GrGLSLFragmentProcessor::EmitArgs& emitArgs = *DSLWriter::CurrentEmitArgs(); in SampleChild()
58 code.c_str(), DSLWriter::Context().fTypes.fHalf4.get())); in SampleChild()
62 return DSLWriter::VarUniformHandle(var); in VarUniformHandle()
DDSLWriter.h45 class DSLWriter {
47 DSLWriter(SkSL::Compiler* compiler, SkSL::ProgramKind kind, int flags);
49 ~DSLWriter();
217 static DSLWriter& Instance();
219 static void SetInstance(std::unique_ptr<DSLWriter> instance);
/external/skia/src/sksl/dsl/
DDSLFunction.cpp27 return type == *DSLWriter::Context().fTypes.fHalf4 || in init()
28 type == *DSLWriter::Context().fTypes.fFloat4; in init()
37 DSLWriter::ReportError("error: using an already-declared variable as a function " in init()
41 DSLWriter::ReportError("error: variables used as function parameters cannot have " in init()
47 SkSL::ProgramKind kind = DSLWriter::Context().fConfig->fKind; in init()
55 if (type == *DSLWriter::Context().fTypes.fFloat2) { in init()
62 std::unique_ptr<SkSL::Variable> paramVar = DSLWriter::ParameterVar(*param); in init()
73 fDecl = SkSL::FunctionDeclaration::Convert(DSLWriter::Context(), in init()
74 *DSLWriter::SymbolTable(), in init()
76 DSLWriter::Modifiers(SkSL::Modifiers()), in init()
[all …]
DDSLExpression.cpp37 if (DSLWriter::Compiler().errorCount()) { in DSLExpression()
38 DSLWriter::ReportError(DSLWriter::Compiler().errorText(/*showCount=*/false).c_str()); in DSLExpression()
39 DSLWriter::Compiler().setErrorCount(0); in DSLExpression()
44 : fExpression(SkSL::FloatLiteral::Make(DSLWriter::Context(), in DSLExpression()
49 DSLWriter::ReportError("error: floating point value is infinite\n"); in DSLExpression()
51 DSLWriter::ReportError("error: floating point value is NaN\n"); in DSLExpression()
57 : fExpression(SkSL::IntLiteral::Make(DSLWriter::Context(), in DSLExpression()
62 : fExpression(SkSL::IntLiteral::Make(DSLWriter::Context(), in DSLExpression()
67 : fExpression(SkSL::BoolLiteral::Make(DSLWriter::Context(), in DSLExpression()
74 &DSLWriter::Var(var), in DSLExpression()
[all …]
DDSLVar.cpp31 fName = DSLWriter::CurrentEmitArgs()->fSampleCoord; in DSLVar()
37 const SkSL::Modifiers* modifiers = DSLWriter::Context().fModifiersPool->add( in DSLVar()
46 fVar = DSLWriter::SymbolTable()->takeOwnershipOfIRNode(std::make_unique<SkSL::Variable>( in DSLVar()
50 DSLWriter::Context().fTypes.fFloat2.get(), in DSLVar()
56 const SkSL::Symbol* result = (*DSLWriter::SymbolTable())[fName]; in DSLVar()
74 , fName(fType.skslType().isOpaque() ? name : DSLWriter::Name(name)) in DSLVar()
77 , fDeclared(DSLWriter::Instance().fMarkVarsDeclared) { in DSLVar()
81 if (DSLWriter::InFragmentProcessor()) { in DSLVar()
86 SkAssertResult(SkSL::type_to_grsltype(DSLWriter::Context(), in DSLVar()
92 SkAssertResult(SkSL::type_to_grsltype(DSLWriter::Context(), skslType, in DSLVar()
[all …]
DDSLStatement.cpp42 if (DSLWriter::Compiler().errorCount()) { in DSLStatement()
43 DSLWriter::ReportError(DSLWriter::Compiler().errorText(/*showCount=*/false).c_str()); in DSLStatement()
44 DSLWriter::Compiler().setErrorCount(0); in DSLStatement()
52 if (DSLWriter::Compiler().errorCount()) { in DSLStatement()
53 DSLWriter::ReportError(DSLWriter::Compiler().errorText(/*showCount=*/false).c_str(), &pos); in DSLStatement()
54 DSLWriter::Compiler().setErrorCount(0); in DSLStatement()
61 if (fStatement && DSLWriter::InFragmentProcessor()) { in ~DSLStatement()
62 DSLWriter::CurrentEmitArgs()->fFragBuilder->codeAppend(this->release()); in ~DSLStatement()
DDSLCore.cpp29 DSLWriter::SetInstance(std::make_unique<DSLWriter>(compiler, kind, flags)); in Start()
33 SkASSERTF(!DSLWriter::InFragmentProcessor(), in End()
35 DSLWriter::SetInstance(nullptr); in End()
39 DSLWriter::SetErrorHandler(errorHandler); in SetErrorHandler()
54 SkSL::IRGenerator& ir = DSLWriter::IRGenerator(); in Call()
76 DSLWriter::ReportError("error: variable has already been declared\n", &pos); in Declare()
79 DSLWriter::ReportError("error: this variable must be declared with DeclareGlobal\n", in Declare()
83 return DSLWriter::Declaration(var); in Declare()
88 DSLWriter::ReportError("error: variable has already been declared\n", &pos); in DeclareGlobal()
92 std::unique_ptr<SkSL::Statement> stmt = DSLWriter::Declaration(var); in DeclareGlobal()
[all …]
DDSLRuntimeEffects.cpp24 SkSL::ProgramSettings& settings = DSLWriter::IRGenerator().fContext.fConfig->fSettings; in StartRuntimeShader()
32 std::unique_ptr<SkSL::Program> program = DSLWriter::ReleaseProgram(); in EndRuntimeShader()
36 SkSL::ProgramSettings& settings = DSLWriter::IRGenerator().fContext.fConfig->fSettings; in EndRuntimeShader()
DDSLType.cpp66 const SkSL::Context& context = DSLWriter::Context(); in skslType()
172 return DSLWriter::Construct(type.skslType(), std::move(argArray)); in Construct()
177 return DSLWriter::SymbolTable()->addArrayDimension(&base.skslType(), count); in Array()
186 const SkSL::Type* result = DSLWriter::SymbolTable()->add(Type::MakeStructType(/*offset=*/-1, in Struct()
189 DSLWriter::ProgramElements().push_back(std::make_unique<SkSL::StructDefinition>(/*offset=*/-1, in Struct()
DDSLLayout.cpp18 DSLWriter::ReportError(("error: layout qualifier '" + String(name) + in flag()
/external/skia/tests/
DSkSLDSLTest.cpp1213 DSLExpression sqrt = DSLWriter::IRGenerator().convertIdentifier(/*offset=*/-1, "sqrt"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1220 DSLExpression pow = DSLWriter::IRGenerator().convertIdentifier(/*offset=*/-1, "pow"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1252 REPORTER_ASSERT(r, DSLWriter::ProgramElements().size() == 1); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1253 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1272 REPORTER_ASSERT(r, DSLWriter::ProgramElements().size() == 1); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1273 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1318 REPORTER_ASSERT(r, DSLWriter::ProgramElements().size() == 2); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1319 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], "int x = 0;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1320 EXPECT_EQUAL(*DSLWriter::ProgramElements()[1], "uniform float2 y;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1380 REPORTER_ASSERT(r, DSLWriter::ProgramElements().size() == 1); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
[all …]
DSkSLDSLErrorLineNumbers.cpp63 DSLWriter::MarkDeclared(a); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
72 DSLWriter::MarkDeclared(a); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
81 DSLWriter::MarkDeclared(a); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
/external/skia/src/sksl/
DSkSLCompiler.h45 class DSLWriter; variable
247 friend class dsl::DSLWriter;
DSkSLIRGenerator.h40 class DSLWriter; variable
286 friend class dsl::DSLWriter;
/external/skia/include/sksl/
DDSLModifiers.h51 friend class DSLWriter; variable
DDSLStatement.h66 friend class DSLWriter; variable
DDSLVar.h153 friend class DSLWriter; variable
DDSLType.h177 friend class DSLWriter; variable
DDSLExpression.h138 friend class DSLWriter; variable
/external/skia/src/gpu/glsl/
DGrGLSLShaderBuilder.h25 class DSLWriter; variable
292 friend class SkSL::dsl::DSLWriter;
DGrGLSLShaderBuilder.cpp89 SkASSERT(SkSL::dsl::DSLWriter::CurrentProcessor()); in codeAppend()
/external/skia/gm/
Ddsl_processor_test.cpp40 SkASSERT(DSLWriter::Var(x).initialValue()->description() == "1"); in onMakeProgramImpl()
/external/skia/gn/
Dsksl.gni92 "$_src/sksl/dsl/priv/DSLWriter.cpp",
93 "$_src/sksl/dsl/priv/DSLWriter.h",
/external/skia/
DAndroid.bp835 "src/sksl/dsl/priv/DSLWriter.cpp",
1322 "src/sksl/dsl/priv/DSLWriter.cpp",