Nebula
Loading...
Searching...
No Matches
Vulkan::VkShaderServer Class Reference

#include <vkshaderserver.h>

Inherits Base::ShaderServerBase.

Classes

struct  _PendingView
 
struct  _PendingViewDelete
 

Public Member Functions

 VkShaderServer ()
 constructor
 
virtual ~VkShaderServer ()
 destructor
 
bool Open ()
 open the shader server
 
void Close ()
 close the shader server
 
void AddPendingImageView (CoreGraphics::TextureId tex, VkImageViewCreateInfo viewCreate, uint32_t bind)
 add a pending image view update to the update queue, thread safe
 
void UpdateResources ()
 begin frame
 
- Public Member Functions inherited from Base::ShaderServerBase
 ShaderServerBase ()
 constructor
 
virtual ~ShaderServerBase ()
 destructor
 
bool Open ()
 open the shader server
 
void Close ()
 close the shader server
 
bool IsOpen () const
 return true if the shader server is open
 
bool HasShader (const Resources::ResourceName &resId) const
 return true if a shader exists
 
const Util::Dictionary< Resources::ResourceName, Resources::ResourceId > & GetAllShaders () const
 get all loaded shaders
 
const CoreGraphics::ShaderId GetShader (Resources::ResourceName resId) const
 get shader by name
 
void ResetFeatureBits ()
 reset the current feature bits
 
void SetFeatureBits (CoreGraphics::ShaderFeature::Mask m)
 set shader feature by bit mask
 
void ClearFeatureBits (CoreGraphics::ShaderFeature::Mask m)
 clear shader feature by bit mask
 
CoreGraphics::ShaderFeature::Mask GetFeatureBits () const
 get the current feature mask
 
CoreGraphics::ShaderFeature::Mask FeatureStringToMask (const Util::String &str)
 convert a shader feature string into a feature bit mask
 
Util::String FeatureMaskToString (CoreGraphics::ShaderFeature::Mask mask)
 convert shader feature bit mask into string
 
void LoadShader (const Resources::ResourceName &shdName)
 explicitly loads a shader by resource id
 
void BeforeFrame ()
 update shader server outside of frame
 
- Public Member Functions inherited from Core::RefCounted
 RefCounted ()
 constructor
 
int GetRefCount () const
 get the current refcount
 
void AddRef ()
 increment refcount by one
 
void Release ()
 decrement refcount and destroy object if refcount is zero
 
bool IsInstanceOf (const Rtti &rtti) const
 return true if this object is instance of given class
 
bool IsInstanceOf (const Util::String &className) const
 return true if this object is instance of given class by string
 
bool IsInstanceOf (const Util::FourCC &classFourCC) const
 return true if this object is instance of given class by fourcc
 
bool IsA (const Rtti &rtti) const
 return true if this object is instance of given class, or a derived class
 
bool IsA (const Util::String &rttiName) const
 return true if this object is instance of given class, or a derived class, by string
 
bool IsA (const Util::FourCC &rttiFourCC) const
 return true if this object is instance of given class, or a derived class, by fourcc
 
const Util::StringGetClassName () const
 get the class name
 
Util::FourCC GetClassFourCC () const
 get the class FourCC code
 

Private Member Functions

 __DeclareClass (VkShaderServer)
 
 __DeclareInterfaceSingleton (VkShaderServer)
 

Private Attributes

Threading::CriticalSection bindResourceCriticalSection
 
Threading::SafeQueue< _PendingViewpendingViews
 
Util::Array< _PendingViewDeletependingViewDeletes
 
AnyFX::EffectFactory * factory
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::RefCounted
static void DumpRefCountingLeaks ()
 dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
 
- Protected Member Functions inherited from Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)
 
- Protected Attributes inherited from Base::ShaderServerBase
CoreGraphics::ShaderIdentifier shaderIdentifierRegistry
 
CoreGraphics::ShaderFeature shaderFeature
 
CoreGraphics::ShaderFeature::Mask curShaderFeatureBits
 
Util::Dictionary< Resources::ResourceName, Resources::ResourceId > shaders
 
Threading::SafeQueue< Resources::ResourceNamependingShaderReloads
 
Ids::Id32 objectIdShaderVar
 
bool isOpen
 

Constructor & Destructor Documentation

◆ VkShaderServer()

Vulkan::VkShaderServer::VkShaderServer ( )

constructor

◆ ~VkShaderServer()

Vulkan::VkShaderServer::~VkShaderServer ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Vulkan::VkShaderServer::__DeclareClass ( VkShaderServer )
private

◆ __DeclareInterfaceSingleton()

Vulkan::VkShaderServer::__DeclareInterfaceSingleton ( VkShaderServer )
private

◆ AddPendingImageView()

void Vulkan::VkShaderServer::AddPendingImageView ( CoreGraphics::TextureId tex,
VkImageViewCreateInfo viewCreate,
uint32_t bind )

add a pending image view update to the update queue, thread safe

◆ Close()

void Vulkan::VkShaderServer::Close ( )

close the shader server

◆ Open()

bool Vulkan::VkShaderServer::Open ( )

open the shader server

◆ UpdateResources()

void Vulkan::VkShaderServer::UpdateResources ( )

begin frame

Member Data Documentation

◆ bindResourceCriticalSection

Threading::CriticalSection Vulkan::VkShaderServer::bindResourceCriticalSection
private

◆ factory

AnyFX::EffectFactory* Vulkan::VkShaderServer::factory
private

◆ pendingViewDeletes

Util::Array<_PendingViewDelete> Vulkan::VkShaderServer::pendingViewDeletes
private

◆ pendingViews

Threading::SafeQueue<_PendingView> Vulkan::VkShaderServer::pendingViews
private

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