Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
GrSPIRVUniformHandler Class Reference

#include <GrSPIRVUniformHandler.h>

Inheritance diagram for GrSPIRVUniformHandler:
GrGLSLUniformHandler

Classes

struct  SPIRVUniformInfo
 

Public Types

enum  { kUniformBinding = 0 , kUniformDescriptorSet = 0 , kSamplerTextureDescriptorSet = 1 }
 
typedef SkTBlockList< SPIRVUniformInfoUniformInfoArray
 
- Public Types inherited from GrGLSLUniformHandler
using UniformHandle = GrGLSLProgramDataManager::UniformHandle
 

Public Member Functions

const GrShaderVargetUniformVariable (UniformHandle u) const override
 
const char * getUniformCStr (UniformHandle u) const override
 
uint32_t getRTFlipOffset () const
 
int numUniforms () const override
 
UniformInfouniform (int idx) override
 
const UniformInfouniform (int idx) const override
 
- Public Member Functions inherited from GrGLSLUniformHandler
virtual ~GrGLSLUniformHandler ()
 
UniformHandle addUniform (const GrProcessor *owner, uint32_t visibility, SkSLType type, const char *name, const char **outName=nullptr)
 
UniformHandle addUniformArray (const GrProcessor *owner, uint32_t visibility, SkSLType type, const char *name, int arrayCount, const char **outName=nullptr)
 
virtual const GrShaderVargetUniformVariable (UniformHandle u) const =0
 
virtual const char * getUniformCStr (UniformHandle u) const =0
 
virtual int numUniforms () const =0
 
virtual UniformInfouniform (int idx)=0
 
virtual const UniformInfouniform (int idx) const =0
 
GrShaderVar getUniformMapping (const GrProcessor &owner, SkString rawName) const
 
GrShaderVar liftUniformToVertexShader (const GrProcessor &owner, SkString rawName)
 

Static Public Attributes

static const int kUniformsPerBlock = 8
 

Friends

class GrD3DPipelineStateBuilder
 
class GrDawnProgramBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from GrGLSLUniformHandler
 GrGLSLUniformHandler (GrGLSLProgramBuilder *program)
 
- Protected Attributes inherited from GrGLSLUniformHandler
GrGLSLProgramBuilderfProgramBuilder
 

Detailed Description

Definition at line 21 of file GrSPIRVUniformHandler.h.

Member Typedef Documentation

◆ UniformInfoArray

Definition at line 31 of file GrSPIRVUniformHandler.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kUniformBinding 
kUniformDescriptorSet 
kSamplerTextureDescriptorSet 

Definition at line 32 of file GrSPIRVUniformHandler.h.

Member Function Documentation

◆ getRTFlipOffset()

uint32_t GrSPIRVUniformHandler::getRTFlipOffset ( ) const

Definition at line 294 of file GrSPIRVUniformHandler.cpp.

294 {
295 uint32_t currentOffset = fCurrentUBOOffset;
296 return get_ubo_offset(&currentOffset, SkSLType::kFloat2, 0);
297}

◆ getUniformCStr()

const char * GrSPIRVUniformHandler::getUniformCStr ( UniformHandle  u) const
overridevirtual

Shortcut for getUniformVariable(u).c_str()

Implements GrGLSLUniformHandler.

Definition at line 22 of file GrSPIRVUniformHandler.cpp.

22 {
23 return fUniforms.item(u.toIndex()).fVariable.getName().c_str();
24}
const SkString & getName() const
Definition: GrShaderVar.h:91
const char * c_str() const
Definition: SkString.h:133
T & item(int i)
Definition: SkTBlockList.h:217

◆ getUniformVariable()

const GrShaderVar & GrSPIRVUniformHandler::getUniformVariable ( UniformHandle  u) const
overridevirtual

Implements GrGLSLUniformHandler.

Definition at line 18 of file GrSPIRVUniformHandler.cpp.

18 {
19 return fUniforms.item(u.toIndex()).fVariable;
20}

◆ numUniforms()

int GrSPIRVUniformHandler::numUniforms ( ) const
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 39 of file GrSPIRVUniformHandler.h.

39 {
40 return fUniforms.count();
41 }
int count() const
Definition: SkTBlockList.h:167

◆ uniform() [1/2]

const UniformInfo & GrSPIRVUniformHandler::uniform ( int  idx) const
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 46 of file GrSPIRVUniformHandler.h.

46 {
47 return fUniforms.item(idx);
48 }

◆ uniform() [2/2]

UniformInfo & GrSPIRVUniformHandler::uniform ( int  idx)
inlineoverridevirtual

Implements GrGLSLUniformHandler.

Definition at line 43 of file GrSPIRVUniformHandler.h.

43 {
44 return fUniforms.item(idx);
45 }

Friends And Related Function Documentation

◆ GrD3DPipelineStateBuilder

friend class GrD3DPipelineStateBuilder
friend

Definition at line 73 of file GrSPIRVUniformHandler.h.

◆ GrDawnProgramBuilder

friend class GrDawnProgramBuilder
friend

Definition at line 74 of file GrSPIRVUniformHandler.h.

Member Data Documentation

◆ kUniformsPerBlock

const int GrSPIRVUniformHandler::kUniformsPerBlock = 8
static

Definition at line 23 of file GrSPIRVUniformHandler.h.


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