Nebula
|
#include <vkshaderpool.h>
Inherits Resources::ResourceStreamCache.
Classes | |
struct | BufferMapping |
struct | DescriptorSetBinding |
struct | VkReflectionInfo |
struct | VkShaderRuntimeInfo |
struct | VkShaderSetupInfo |
Public Types | |
typedef Util::Dictionary< CoreGraphics::ShaderFeature::Mask, CoreGraphics::ShaderProgramId > | ProgramMap |
Public Member Functions | |
VkShaderCache () | |
constructor | |
virtual | ~VkShaderCache () |
destructor | |
CoreGraphics::ShaderProgramId | GetShaderProgram (const CoreGraphics::ShaderId shaderId, const CoreGraphics::ShaderFeature::Mask mask) |
get shader-program id, which can be used to directly access a program in a shader | |
CoreGraphics::ResourceTableId | CreateResourceTable (const CoreGraphics::ShaderId id, const IndexT group, const uint overallocationSize) |
create resource table | |
CoreGraphics::BufferId | CreateConstantBuffer (const CoreGraphics::ShaderId id, const Util::StringAtom &name, CoreGraphics::BufferAccessMode mode) |
create constant buffer from name | |
CoreGraphics::BufferId | CreateConstantBuffer (const CoreGraphics::ShaderId id, const IndexT cbIndex, CoreGraphics::BufferAccessMode mode) |
create constant buffer from id | |
const IndexT | GetConstantBinding (const CoreGraphics::ShaderId id, const Util::StringAtom &name) const |
get constant buffer binding from name | |
const IndexT | GetConstantBinding (const CoreGraphics::ShaderId id, const IndexT cIndex) const |
get constant buffer binding from index | |
const SizeT | GetConstantBindingsCount (const CoreGraphics::ShaderId id) const |
get constant buffer bindings | |
CoreGraphics::ResourceTableLayoutId | GetResourceTableLayout (const CoreGraphics::ShaderId id, const IndexT group) |
get the resource table layout | |
CoreGraphics::ResourcePipelineId | GetResourcePipeline (const CoreGraphics::ShaderId id) |
get the pipeline layout | |
const SizeT | GetConstantCount (const CoreGraphics::ShaderId id) const |
get number of variables for shader | |
const CoreGraphics::ShaderConstantType | GetConstantType (const CoreGraphics::ShaderId id, const IndexT i) const |
get type of constant by index | |
const CoreGraphics::ShaderConstantType | GetConstantType (const CoreGraphics::ShaderId id, const Util::StringAtom &name) const |
get type of constant by index | |
const Util::StringAtom | GetConstantBlockName (const CoreGraphics::ShaderId id, const Util::StringAtom &name) |
get name of constant block wherein the variable resides | |
const Util::StringAtom | GetConstantBlockName (const CoreGraphics::ShaderId id, const IndexT cIndex) |
get name of constant block wherein the variable resides | |
const Util::StringAtom | GetConstantName (const CoreGraphics::ShaderId id, const IndexT i) const |
get name of constant by index | |
const IndexT | GetConstantGroup (const CoreGraphics::ShaderId id, const Util::StringAtom &name) const |
get constant buffer group index of constant | |
const IndexT | GetConstantSlot (const CoreGraphics::ShaderId id, const Util::StringAtom &name) const |
get constant buffer slot index of constant | |
const SizeT | GetConstantBufferCount (const CoreGraphics::ShaderId id) const |
get number of constant blocks | |
const SizeT | GetConstantBufferSize (const CoreGraphics::ShaderId id, const IndexT i) const |
get size of constant buffer | |
const Util::StringAtom | GetConstantBufferName (const CoreGraphics::ShaderId id, const IndexT i) const |
get name of constnat buffer | |
const IndexT | GetConstantBufferResourceSlot (const CoreGraphics::ShaderId id, const IndexT i) const |
get slot of constant buffer based on index | |
const IndexT | GetConstantBufferResourceGroup (const CoreGraphics::ShaderId id, const IndexT i) const |
get group of constant buffer based on index | |
const IndexT | GetResourceSlot (const CoreGraphics::ShaderId id, const Util::StringAtom &name) const |
get slot of shader resource | |
const Util::Dictionary< CoreGraphics::ShaderFeature::Mask, CoreGraphics::ShaderProgramId > & | GetPrograms (const CoreGraphics::ShaderId id) |
get list all mask-program pairs | |
Util::String | GetProgramName (CoreGraphics::ShaderProgramId id) |
get name of program | |
Private Types | |
enum | { Shader_ReflectionInfo , Shader_SetupInfo , Shader_RuntimeInfo , Shader_ProgramAllocator } |
typedef Util::Dictionary< Util::StringAtom, CoreGraphics::BufferId > | UniformBufferMap |
typedef Util::Dictionary< uint32_t, Util::Array< CoreGraphics::BufferId > > | UniformBufferGroupMap |
Private Member Functions | |
__DeclareClass (VkShaderCache) | |
friend | void::CoreGraphics::SetShaderProgram (const CoreGraphics::ShaderProgramId pro, const CoreGraphics::QueueType queue, const bool bindSharedResources) |
const VkProgramReflectionInfo & | GetProgram (const CoreGraphics::ShaderProgramId shaderProgramId) |
get shader program | |
LoadStatus | LoadFromStream (const Resources::ResourceId id, const Util::StringAtom &tag, const Ptr< IO::Stream > &stream, bool immediate=false) override |
load shader | |
LoadStatus | ReloadFromStream (const Resources::ResourceId id, const Ptr< IO::Stream > &stream) override |
reload shader | |
void | Unload (const Resources::ResourceId id) override |
unload shader | |
__ImplementResourceAllocatorTyped (shaderAlloc, CoreGraphics::ShaderIdType) | |
Private Attributes | |
Ids::IdAllocator< VkReflectionInfo, VkShaderSetupInfo, VkShaderRuntimeInfo, VkShaderProgramAllocator > | shaderAlloc |
this member allocates shaders | |
CoreGraphics::ShaderProgramId | activeShaderProgram |
CoreGraphics::ShaderFeature::Mask | activeMask |
Util::Dictionary< Ids::Id24, Ids::Id32 > | slicedStateMap |
Friends | |
class | VkVertexSignatureCache |
class | VkPipelineDatabase |
Util::Dictionary<CoreGraphics::ShaderFeature::Mask, CoreGraphics::ShaderProgramId> Vulkan::VkShaderCache::ProgramMap |
|
private |
|
private |
|
private |
Vulkan::VkShaderCache::VkShaderCache | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
private |
CoreGraphics::BufferId Vulkan::VkShaderCache::CreateConstantBuffer | ( | const CoreGraphics::ShaderId | id, |
const IndexT | cbIndex, | ||
CoreGraphics::BufferAccessMode | mode ) |
create constant buffer from id
CoreGraphics::BufferId Vulkan::VkShaderCache::CreateConstantBuffer | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name, | ||
CoreGraphics::BufferAccessMode | mode ) |
create constant buffer from name
CoreGraphics::ResourceTableId Vulkan::VkShaderCache::CreateResourceTable | ( | const CoreGraphics::ShaderId | id, |
const IndexT | group, | ||
const uint | overallocationSize ) |
create resource table
const IndexT Vulkan::VkShaderCache::GetConstantBinding | ( | const CoreGraphics::ShaderId | id, |
const IndexT | cIndex ) const |
get constant buffer binding from index
const IndexT Vulkan::VkShaderCache::GetConstantBinding | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name ) const |
get constant buffer binding from name
const SizeT Vulkan::VkShaderCache::GetConstantBindingsCount | ( | const CoreGraphics::ShaderId | id | ) | const |
get constant buffer bindings
const Util::StringAtom Vulkan::VkShaderCache::GetConstantBlockName | ( | const CoreGraphics::ShaderId | id, |
const IndexT | cIndex ) |
get name of constant block wherein the variable resides
const Util::StringAtom Vulkan::VkShaderCache::GetConstantBlockName | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name ) |
get name of constant block wherein the variable resides
const SizeT Vulkan::VkShaderCache::GetConstantBufferCount | ( | const CoreGraphics::ShaderId | id | ) | const |
get number of constant blocks
const Util::StringAtom Vulkan::VkShaderCache::GetConstantBufferName | ( | const CoreGraphics::ShaderId | id, |
const IndexT | i ) const |
get name of constnat buffer
const IndexT Vulkan::VkShaderCache::GetConstantBufferResourceGroup | ( | const CoreGraphics::ShaderId | id, |
const IndexT | i ) const |
get group of constant buffer based on index
const IndexT Vulkan::VkShaderCache::GetConstantBufferResourceSlot | ( | const CoreGraphics::ShaderId | id, |
const IndexT | i ) const |
get slot of constant buffer based on index
const SizeT Vulkan::VkShaderCache::GetConstantBufferSize | ( | const CoreGraphics::ShaderId | id, |
const IndexT | i ) const |
get size of constant buffer
const SizeT Vulkan::VkShaderCache::GetConstantCount | ( | const CoreGraphics::ShaderId | id | ) | const |
get number of variables for shader
const IndexT Vulkan::VkShaderCache::GetConstantGroup | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name ) const |
get constant buffer group index of constant
const Util::StringAtom Vulkan::VkShaderCache::GetConstantName | ( | const CoreGraphics::ShaderId | id, |
const IndexT | i ) const |
get name of constant by index
const IndexT Vulkan::VkShaderCache::GetConstantSlot | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name ) const |
get constant buffer slot index of constant
const CoreGraphics::ShaderConstantType Vulkan::VkShaderCache::GetConstantType | ( | const CoreGraphics::ShaderId | id, |
const IndexT | i ) const |
get type of constant by index
const CoreGraphics::ShaderConstantType Vulkan::VkShaderCache::GetConstantType | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name ) const |
get type of constant by index
|
private |
get shader program
Use direct resource ids, not the State, Shader or Variable type ids.
Util::String Vulkan::VkShaderCache::GetProgramName | ( | CoreGraphics::ShaderProgramId | id | ) |
get name of program
const Util::Dictionary< CoreGraphics::ShaderFeature::Mask, CoreGraphics::ShaderProgramId > & Vulkan::VkShaderCache::GetPrograms | ( | const CoreGraphics::ShaderId | id | ) |
get list all mask-program pairs
CoreGraphics::ResourcePipelineId Vulkan::VkShaderCache::GetResourcePipeline | ( | const CoreGraphics::ShaderId | id | ) |
get the pipeline layout
const IndexT Vulkan::VkShaderCache::GetResourceSlot | ( | const CoreGraphics::ShaderId | id, |
const Util::StringAtom & | name ) const |
get slot of shader resource
CoreGraphics::ResourceTableLayoutId Vulkan::VkShaderCache::GetResourceTableLayout | ( | const CoreGraphics::ShaderId | id, |
const IndexT | group ) |
get the resource table layout
CoreGraphics::ShaderProgramId Vulkan::VkShaderCache::GetShaderProgram | ( | const CoreGraphics::ShaderId | shaderId, |
const CoreGraphics::ShaderFeature::Mask | mask ) |
get shader-program id, which can be used to directly access a program in a shader
|
overrideprivate |
load shader
|
overrideprivate |
reload shader
|
overrideprivate |
unload shader
|
private |
|
friend |
|
friend |
|
private |
|
private |
|
private |
this member allocates shaders
|
private |