#include <GrGLSLUniformHandler.h>
|
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 GrShaderVar & | getUniformVariable (UniformHandle u) const =0 |
|
virtual const char * | getUniformCStr (UniformHandle u) const =0 |
|
virtual int | numUniforms () const =0 |
|
virtual UniformInfo & | uniform (int idx)=0 |
|
virtual const UniformInfo & | uniform (int idx) const =0 |
|
GrShaderVar | getUniformMapping (const GrProcessor &owner, SkString rawName) const |
|
GrShaderVar | liftUniformToVertexShader (const GrProcessor &owner, SkString rawName) |
|
|
virtual const char * | samplerVariable (SamplerHandle) const =0 |
|
virtual skgpu::Swizzle | samplerSwizzle (SamplerHandle) const =0 |
|
virtual const char * | inputSamplerVariable (SamplerHandle) const |
|
virtual skgpu::Swizzle | inputSamplerSwizzle (SamplerHandle) const |
|
virtual SamplerHandle | addSampler (const GrBackendFormat &, GrSamplerState, const skgpu::Swizzle &, const char *name, const GrShaderCaps *)=0 |
|
virtual SamplerHandle | addInputSampler (const skgpu::Swizzle &swizzle, const char *name) |
|
virtual UniformHandle | internalAddUniformArray (const GrProcessor *owner, uint32_t visibility, SkSLType type, const char *name, bool mangleName, int arrayCount, const char **outName)=0 |
|
virtual void | appendUniformDecls (GrShaderFlags visibility, SkString *) const =0 |
|
Definition at line 41 of file GrGLSLUniformHandler.h.
◆ UniformHandle
◆ ~GrGLSLUniformHandler()
virtual GrGLSLUniformHandler::~GrGLSLUniformHandler |
( |
| ) |
|
|
inlinevirtual |
◆ GrGLSLUniformHandler()
◆ addInputSampler()
virtual SamplerHandle GrGLSLUniformHandler::addInputSampler |
( |
const skgpu::Swizzle & |
swizzle, |
|
|
const char * |
name |
|
) |
| |
|
inlineprivatevirtual |
Definition at line 125 of file GrGLSLUniformHandler.h.
125 {
126 SkDEBUGFAIL(
"Trying to add input sampler to unsupported backend");
127 return {};
128 }
#define SkDEBUGFAIL(message)
◆ addSampler()
◆ addUniform()
UniformHandle GrGLSLUniformHandler::addUniform |
( |
const GrProcessor * |
owner, |
|
|
uint32_t |
visibility, |
|
|
SkSLType |
type, |
|
|
const char * |
name, |
|
|
const char ** |
outName = nullptr |
|
) |
| |
|
inline |
Add a uniform variable to the current program, that has visibility in one or more shaders. visibility is a bitfield of GrShaderFlag values indicating from which shaders the uniform should be accessible. At least one bit must be set. Geometry shader uniforms are not supported at this time. The actual uniform name will be mangled. If outName is not nullptr then it will refer to the final uniform name after return. Use the addUniformArray variant to add an array of uniforms.
Definition at line 62 of file GrGLSLUniformHandler.h.
66 {
69 }
bool SkSLTypeIsCombinedSamplerType(SkSLType type)
DEF_SWITCHES_START aot vmservice shared library name
◆ addUniformArray()
UniformHandle GrGLSLUniformHandler::addUniformArray |
( |
const GrProcessor * |
owner, |
|
|
uint32_t |
visibility, |
|
|
SkSLType |
type, |
|
|
const char * |
name, |
|
|
int |
arrayCount, |
|
|
const char ** |
outName = nullptr |
|
) |
| |
|
inline |
◆ appendUniformDecls()
◆ getUniformCStr()
virtual const char * GrGLSLUniformHandler::getUniformCStr |
( |
UniformHandle |
u | ) |
const |
|
pure virtual |
◆ getUniformMapping()
Definition at line 10 of file GrGLSLUniformHandler.cpp.
11 {
13 const UniformInfo& u = this->
uniform(
i);
14 if (u.fOwner == &owner && u.fRawName == rawName) {
15 return u.fVariable;
16 }
17 }
19}
◆ getUniformVariable()
◆ inputSamplerSwizzle()
virtual skgpu::Swizzle GrGLSLUniformHandler::inputSamplerSwizzle |
( |
SamplerHandle |
| ) |
const |
|
inlineprivatevirtual |
◆ inputSamplerVariable()
virtual const char * GrGLSLUniformHandler::inputSamplerVariable |
( |
SamplerHandle |
| ) |
const |
|
inlineprivatevirtual |
◆ internalAddUniformArray()
virtual UniformHandle GrGLSLUniformHandler::internalAddUniformArray |
( |
const GrProcessor * |
owner, |
|
|
uint32_t |
visibility, |
|
|
SkSLType |
type, |
|
|
const char * |
name, |
|
|
bool |
mangleName, |
|
|
int |
arrayCount, |
|
|
const char ** |
outName |
|
) |
| |
|
privatepure virtual |
◆ liftUniformToVertexShader()
Definition at line 21 of file GrGLSLUniformHandler.cpp.
22 {
25 if (u.fOwner == &owner && u.fRawName == rawName) {
27 return u.fVariable;
28 }
29 }
30
31
32
34}
◆ numUniforms()
virtual int GrGLSLUniformHandler::numUniforms |
( |
| ) |
const |
|
pure virtual |
◆ samplerSwizzle()
virtual skgpu::Swizzle GrGLSLUniformHandler::samplerSwizzle |
( |
SamplerHandle |
| ) |
const |
|
privatepure virtual |
◆ samplerVariable()
virtual const char * GrGLSLUniformHandler::samplerVariable |
( |
SamplerHandle |
| ) |
const |
|
privatepure virtual |
◆ uniform() [1/2]
virtual const UniformInfo & GrGLSLUniformHandler::uniform |
( |
int |
idx | ) |
const |
|
pure virtual |
◆ uniform() [2/2]
◆ GrGLSLProgramBuilder
◆ fProgramBuilder
The documentation for this class was generated from the following files: