Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
GrD3DPipelineStateDataManager Class Reference

#include <GrD3DPipelineStateDataManager.h>

Inheritance diagram for GrD3DPipelineStateDataManager:
GrUniformDataManager GrGLSLProgramDataManager

Public Types

typedef GrSPIRVUniformHandler::UniformInfoArray UniformInfoArray
 
- Public Types inherited from GrGLSLProgramDataManager
enum class  Specialized : bool { kNo = false , kYes = true }
 

Public Member Functions

 GrD3DPipelineStateDataManager (const UniformInfoArray &, uint32_t uniformSize)
 
D3D12_GPU_VIRTUAL_ADDRESS uploadConstants (GrD3DGpu *gpu)
 
- Public Member Functions inherited from GrUniformDataManager
 GrUniformDataManager (uint32_t uniformCount, uint32_t uniformSize)
 
void set1i (UniformHandle, int32_t) const override
 
void set1iv (UniformHandle, int arrayCount, const int32_t v[]) const override
 
void set1f (UniformHandle, float v0) const override
 
void set1fv (UniformHandle, int arrayCount, const float v[]) const override
 
void set2i (UniformHandle, int32_t, int32_t) const override
 
void set2iv (UniformHandle, int arrayCount, const int32_t v[]) const override
 
void set2f (UniformHandle, float, float) const override
 
void set2fv (UniformHandle, int arrayCount, const float v[]) const override
 
void set3i (UniformHandle, int32_t, int32_t, int32_t) const override
 
void set3iv (UniformHandle, int arrayCount, const int32_t v[]) const override
 
void set3f (UniformHandle, float, float, float) const override
 
void set3fv (UniformHandle, int arrayCount, const float v[]) const override
 
void set4i (UniformHandle, int32_t, int32_t, int32_t, int32_t) const override
 
void set4iv (UniformHandle, int arrayCount, const int32_t v[]) const override
 
void set4f (UniformHandle, float, float, float, float) const override
 
void set4fv (UniformHandle, int arrayCount, const float v[]) const override
 
void setMatrix2f (UniformHandle, const float matrix[]) const override
 
void setMatrix3f (UniformHandle, const float matrix[]) const override
 
void setMatrix4f (UniformHandle, const float matrix[]) const override
 
void setMatrix2fv (UniformHandle, int arrayCount, const float matrices[]) const override
 
void setMatrix3fv (UniformHandle, int arrayCount, const float matrices[]) const override
 
void setMatrix4fv (UniformHandle, int arrayCount, const float matrices[]) const override
 
void markDirty ()
 
- Public Member Functions inherited from GrGLSLProgramDataManager
virtual ~GrGLSLProgramDataManager ()
 
virtual void set1i (UniformHandle, int32_t) const =0
 
virtual void set1iv (UniformHandle, int arrayCount, const int v[]) const =0
 
virtual void set1f (UniformHandle, float v0) const =0
 
virtual void set1fv (UniformHandle, int arrayCount, const float v[]) const =0
 
virtual void set2i (UniformHandle, int32_t, int32_t) const =0
 
virtual void set2iv (UniformHandle, int arrayCount, const int v[]) const =0
 
virtual void set2f (UniformHandle, float, float) const =0
 
virtual void set2fv (UniformHandle, int arrayCount, const float v[]) const =0
 
virtual void set3i (UniformHandle, int32_t, int32_t, int32_t) const =0
 
virtual void set3iv (UniformHandle, int arrayCount, const int v[]) const =0
 
virtual void set3f (UniformHandle, float, float, float) const =0
 
virtual void set3fv (UniformHandle, int arrayCount, const float v[]) const =0
 
virtual void set4i (UniformHandle, int32_t, int32_t, int32_t, int32_t) const =0
 
virtual void set4iv (UniformHandle, int arrayCount, const int v[]) const =0
 
virtual void set4f (UniformHandle, float, float, float, float) const =0
 
virtual void set4fv (UniformHandle, int arrayCount, const float v[]) const =0
 
virtual void setMatrix2f (UniformHandle, const float matrix[]) const =0
 
virtual void setMatrix3f (UniformHandle, const float matrix[]) const =0
 
virtual void setMatrix4f (UniformHandle, const float matrix[]) const =0
 
virtual void setMatrix2fv (UniformHandle, int arrayCount, const float matrices[]) const =0
 
virtual void setMatrix3fv (UniformHandle, int arrayCount, const float matrices[]) const =0
 
virtual void setMatrix4fv (UniformHandle, int arrayCount, const float matrices[]) const =0
 
void setSkMatrix (UniformHandle, const SkMatrix &) const
 
void setSkM44 (UniformHandle, const SkM44 &) const
 
void setRuntimeEffectUniforms (SkSpan< const SkRuntimeEffect::Uniform >, SkSpan< const UniformHandle >, SkSpan< const Specialized >, const void *src) const
 
void setRuntimeEffectUniforms (SkSpan< const SkRuntimeEffect::Uniform > uniforms, SkSpan< const UniformHandle > handles, const void *src) const
 

Additional Inherited Members

- Protected Member Functions inherited from GrUniformDataManager
int copyUniforms (void *dest, const void *src, int numUniforms, SkSLType uniformType) const
 
template<int N, SkSLType kFullType, SkSLType kHalfType>
void set (UniformHandle u, const void *v) const
 
template<int N, SkSLType kFullType, SkSLType kHalfType>
void setv (UniformHandle u, int arrayCount, const void *v) const
 
template<int N, SkSLType FullType, SkSLType HalfType>
void setMatrices (UniformHandle, int arrayCount, const float matrices[]) const
 
void * getBufferPtrAndMarkDirty (const Uniform &uni) const
 
- Protected Member Functions inherited from GrGLSLProgramDataManager
 GrGLSLProgramDataManager ()
 
- Protected Attributes inherited from GrUniformDataManager
uint32_t fUniformSize
 
bool fWrite16BitUniforms = false
 
skia_private::TArray< Uniform, truefUniforms
 
SkAutoMalloc fUniformData
 
bool fUniformsDirty = false
 

Detailed Description

Definition at line 19 of file GrD3DPipelineStateDataManager.h.

Member Typedef Documentation

◆ UniformInfoArray

Definition at line 21 of file GrD3DPipelineStateDataManager.h.

Constructor & Destructor Documentation

◆ GrD3DPipelineStateDataManager()

GrD3DPipelineStateDataManager::GrD3DPipelineStateDataManager ( const UniformInfoArray uniforms,
uint32_t  uniformSize 
)

Definition at line 13 of file GrD3DPipelineStateDataManager.cpp.

15 : INHERITED(uniforms.count(), uniformSize) {
16 // We must add uniforms in same order as the UniformInfoArray so that UniformHandles already
17 // owned by other objects will still match up here.
18 int i = 0;
19 for (const auto& uniformInfo : uniforms.items()) {
20 Uniform& uniform = fUniforms[i];
21 SkASSERT(GrShaderVar::kNonArray == uniformInfo.fVariable.getArrayCount() ||
22 uniformInfo.fVariable.getArrayCount() > 0);
24 uniform.fArrayCount = uniformInfo.fVariable.getArrayCount();
25 uniform.fType = uniformInfo.fVariable.getType();
26 )
27
28 uniform.fOffset = uniformInfo.fUBOOffset;
29 ++i;
30 }
31}
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
skia_private::TArray< Uniform, true > fUniforms

Member Function Documentation

◆ uploadConstants()

D3D12_GPU_VIRTUAL_ADDRESS GrD3DPipelineStateDataManager::uploadConstants ( GrD3DGpu gpu)

Definition at line 33 of file GrD3DPipelineStateDataManager.cpp.

33 {
34 if (fUniformsDirty) {
35 fConstantBufferAddress = gpu->resourceProvider().uploadConstantData(fUniformData.get(),
37 fUniformsDirty = false;
38 }
39
40 return fConstantBufferAddress;
41}
GrD3DResourceProvider & resourceProvider()
Definition: GrD3DGpu.h:38
D3D12_GPU_VIRTUAL_ADDRESS uploadConstantData(void *data, size_t size)
void * get()
Definition: SkAutoMalloc.h:64

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