Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkSL::PointerLValue Class Reference
Inheritance diagram for SkSL::PointerLValue:
SkSL::SPIRVCodeGenerator::LValue

Public Member Functions

 PointerLValue (SPIRVCodeGenerator &gen, SpvId pointer, bool isMemoryObject, SpvId type, SPIRVCodeGenerator::Precision precision, SpvStorageClass_ storageClass)
 
SpvId getPointer () override
 
bool isMemoryObjectPointer () const override
 
SpvStorageClass storageClass () const override
 
SpvId load (OutputStream &out) override
 
void store (SpvId value, OutputStream &out) override
 
- Public Member Functions inherited from SkSL::SPIRVCodeGenerator::LValue
virtual ~LValue ()
 
virtual SpvId getPointer ()
 
virtual bool isMemoryObjectPointer () const
 
virtual bool applySwizzle (const ComponentArray &components, const Type &newType)
 
virtual SpvStorageClass storageClass () const =0
 
virtual SpvId load (OutputStream &out)=0
 
virtual void store (SpvId value, OutputStream &out)=0
 

Detailed Description

Definition at line 3072 of file SkSLSPIRVCodeGenerator.cpp.

Constructor & Destructor Documentation

◆ PointerLValue()

SkSL::PointerLValue::PointerLValue ( SPIRVCodeGenerator gen,
SpvId  pointer,
bool  isMemoryObject,
SpvId  type,
SPIRVCodeGenerator::Precision  precision,
SpvStorageClass_  storageClass 
)
inline

Definition at line 3074 of file SkSLSPIRVCodeGenerator.cpp.

3076 : fGen(gen)
3077 , fPointer(pointer)
3078 , fIsMemoryObject(isMemoryObject)
3079 , fType(type)
3080 , fPrecision(precision)
3081 , fStorageClass(storageClass) {}
GLenum type
SpvStorageClass storageClass() const override
Definition: gen.py:1

Member Function Documentation

◆ getPointer()

SpvId SkSL::PointerLValue::getPointer ( )
inlineoverridevirtual

Reimplemented from SkSL::SPIRVCodeGenerator::LValue.

Definition at line 3083 of file SkSLSPIRVCodeGenerator.cpp.

3083 {
3084 return fPointer;
3085 }

◆ isMemoryObjectPointer()

bool SkSL::PointerLValue::isMemoryObjectPointer ( ) const
inlineoverridevirtual

Reimplemented from SkSL::SPIRVCodeGenerator::LValue.

Definition at line 3087 of file SkSLSPIRVCodeGenerator.cpp.

3087 {
3088 return fIsMemoryObject;
3089 }

◆ load()

SpvId SkSL::PointerLValue::load ( OutputStream out)
inlineoverridevirtual

Implements SkSL::SPIRVCodeGenerator::LValue.

Definition at line 3095 of file SkSLSPIRVCodeGenerator.cpp.

3095 {
3096 return fGen.writeOpLoad(fType, fPrecision, fPointer, out);
3097 }

◆ storageClass()

SpvStorageClass SkSL::PointerLValue::storageClass ( ) const
inlineoverridevirtual

Implements SkSL::SPIRVCodeGenerator::LValue.

Definition at line 3091 of file SkSLSPIRVCodeGenerator.cpp.

3091 {
3092 return fStorageClass;
3093 }

◆ store()

void SkSL::PointerLValue::store ( SpvId  value,
OutputStream out 
)
inlineoverridevirtual

Implements SkSL::SPIRVCodeGenerator::LValue.

Definition at line 3099 of file SkSLSPIRVCodeGenerator.cpp.

3099 {
3100 if (!fIsMemoryObject) {
3101 // We are going to write into an access chain; this could represent one component of a
3102 // vector, or one element of an array. This has the potential to invalidate other,
3103 // *unknown* elements of our store cache. (e.g. if the store cache holds `%50 = myVec4`,
3104 // and we store `%60 = myVec4.z`, this invalidates the cached value for %50.) To avoid
3105 // relying on stale data, reset the store cache entirely when this happens.
3106 fGen.fStoreCache.reset();
3107 }
3108
3109 fGen.writeOpStore(fStorageClass, fPointer, value, out);
3110 }
uint8_t value

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