Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Attributes | Friends | List of all members
SkSL::SPIRVCodeGenerator Class Reference
Inheritance diagram for SkSL::SPIRVCodeGenerator:
SkSL::CodeGenerator

Classes

class  LValue
 
struct  Word
 

Public Member Functions

 SPIRVCodeGenerator (const Context *context, const ShaderCaps *caps, const Program *program, OutputStream *out)
 
bool generateCode () override
 
- Public Member Functions inherited from SkSL::CodeGenerator
 CodeGenerator (const Context *context, const ShaderCaps *caps, const Program *program, OutputStream *stream)
 
virtual ~CodeGenerator ()=default
 
virtual bool generateCode ()=0
 
OutputStreamoutputStream ()
 
void setOutputStream (OutputStream *output)
 

Static Public Attributes

static constexpr SpvId NA = (SpvId)-1
 

Friends

class PointerLValue
 
class SwizzleLValue
 

Additional Inherited Members

- Protected Attributes inherited from SkSL::CodeGenerator
const ProgramfProgram
 
Context fContext
 
const ShaderCapsfCaps
 
OutputStreamfOut
 
- Static Protected Attributes inherited from SkSL::CodeGenerator
static constexpr float kSharpenTexturesBias = -.475f
 

Detailed Description

Definition at line 113 of file SkSLSPIRVCodeGenerator.cpp.

Constructor & Destructor Documentation

◆ SPIRVCodeGenerator()

SkSL::SPIRVCodeGenerator::SPIRVCodeGenerator ( const Context context,
const ShaderCaps caps,
const Program program,
OutputStream out 
)
inline

Definition at line 145 of file SkSLSPIRVCodeGenerator.cpp.

149 : INHERITED(context, caps, program, out) {}

Member Function Documentation

◆ generateCode()

bool SkSL::SPIRVCodeGenerator::generateCode ( )
overridevirtual

Implements SkSL::CodeGenerator.

Definition at line 5358 of file SkSLSPIRVCodeGenerator.cpp.

5358 {
5360 this->writeWord(SpvMagicNumber, *fOut);
5361 this->writeWord(SpvVersion, *fOut);
5362 this->writeWord(SKSL_MAGIC, *fOut);
5363 StringStream buffer;
5364 this->writeInstructions(fProgram, buffer);
5365 this->writeWord(fIdCount, *fOut);
5366 this->writeWord(0, *fOut); // reserved, always zero
5368 return fContext.fErrors->errorCount() == 0;
5369}
#define SkASSERT(cond)
Definition: SkAssert.h:116
const Program & fProgram
ErrorReporter * fErrors
Definition: SkSLContext.h:36
static const int32_t SKSL_MAGIC
void write_stringstream(const StringStream &s, OutputStream &out)
Definition: SkSLUtil.cpp:42
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
static const unsigned int SpvMagicNumber
Definition: spirv.h:56
static const unsigned int SpvVersion
Definition: spirv.h:57

Friends And Related Function Documentation

◆ PointerLValue

friend class PointerLValue
friend

Definition at line 674 of file SkSLSPIRVCodeGenerator.cpp.

◆ SwizzleLValue

friend class SwizzleLValue
friend

Definition at line 675 of file SkSLSPIRVCodeGenerator.cpp.

Member Data Documentation

◆ NA

constexpr SpvId SkSL::SPIRVCodeGenerator::NA = (SpvId)-1
staticconstexpr

Definition at line 116 of file SkSLSPIRVCodeGenerator.cpp.


The documentation for this class was generated from the following file: