![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
Interface to run a workload on the GPU. More...
#include <ComputeSystem.h>
Public Types | |
| using | ShaderLoader = std::function<bool(const char *inName, Array<uint8> &outData, String &outError)> |
| Callback used when loading shaders. | |
Public Member Functions | |
| virtual JPH_OVERRIDE_NEW_DELETE | ~ComputeSystem ()=default |
| Destructor. | |
| virtual ComputeShaderResult | CreateComputeShader (const char *inName, uint32 inGroupSizeX, uint32 inGroupSizeY=1, uint32 inGroupSizeZ=1)=0 |
| Compile a compute shader. | |
| virtual ComputeBufferResult | CreateComputeBuffer (ComputeBuffer::EType inType, uint64 inSize, uint inStride, const void *inData=nullptr)=0 |
| Create a buffer for use with a compute shader. | |
| virtual ComputeQueueResult | CreateComputeQueue ()=0 |
| Create a queue for executing compute shaders. | |
Public Member Functions inherited from RefTarget< ComputeSystem > | |
| RefTarget ()=default | |
| Constructor. | |
| RefTarget (const RefTarget &) | |
| ~RefTarget () | |
| assert no one is referencing us | |
| void | SetEmbedded () const |
| RefTarget & | operator= (const RefTarget &) |
| Assignment operator. | |
| uint32 | GetRefCount () const |
| Get current refcount of this object. | |
| void | AddRef () const |
| Add or release a reference to this object. | |
| void | Release () const |
Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete |
Public Attributes | |
| ShaderLoader | mShaderLoader = [](const char *, Array<uint8> &, String &outError) { JPH_ASSERT(false, "Override this function"); outError = "Not implemented"; return false; } |
Additional Inherited Members | |
Static Public Member Functions inherited from RefTarget< ComputeSystem > | |
| static int | sInternalGetRefCountOffset () |
| INTERNAL HELPER FUNCTION USED BY SERIALIZATION. | |
Protected Attributes inherited from RefTarget< ComputeSystem > | |
| atomic< uint32 > | mRefCount |
| Current reference count. | |
Static Protected Attributes inherited from RefTarget< ComputeSystem > | |
| static constexpr uint32 | cEmbedded |
| A large value that gets added to the refcount to mark the object as embedded. | |
Interface to run a workload on the GPU.
| using ComputeSystem::ShaderLoader = std::function<bool(const char *inName, Array<uint8> &outData, String &outError)> |
Callback used when loading shaders.
|
virtualdefault |
Destructor.
|
pure virtual |
Create a buffer for use with a compute shader.
Implemented in ComputeSystemCPU.
|
pure virtual |
Create a queue for executing compute shaders.
Implemented in ComputeSystemCPU.
|
pure virtual |
Compile a compute shader.
Implemented in ComputeSystemCPU.
| ShaderLoader ComputeSystem::mShaderLoader = [](const char *, Array<uint8> &, String &outError) { JPH_ASSERT(false, "Override this function"); outError = "Not implemented"; return false; } |