29 mShaderRegistry[inName] = inCreateShader;
34 ShaderRegistry mShaderRegistry;
38#define JPH_SHADER_WRAPPER_FUNCTION_NAME(name) RegisterShader##name
39#define JPH_SHADER_WRAPPER_FUNCTION(sys, name) void JPH_EXPORT JPH_SHADER_WRAPPER_FUNCTION_NAME(name)(ComputeSystemCPU *sys)
42#define JPH_DECLARE_REGISTER_SHADER(name) namespace JPH { class ComputeSystemCPU; JPH_SHADER_WRAPPER_FUNCTION(, name); }
45#define JPH_REGISTER_SHADER(sys, name) JPH::JPH_SHADER_WRAPPER_FUNCTION_NAME(name)(sys)
#define JPH_EXPORT
Definition Core.h:275
std::uint64_t uint64
Definition Core.h:504
unsigned int uint
Definition Core.h:500
#define JPH_NAMESPACE_END
Definition Core.h:425
std::uint32_t uint32
Definition Core.h:503
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:50
EType
Type of buffer.
Definition ComputeBuffer.h:24
ShaderWrapper *(*)() CreateShader
Definition ComputeShaderCPU.h:19
Definition ComputeSystemCPU.h:16
ComputeShaderCPU::CreateShader CreateShader
Definition ComputeSystemCPU.h:25
void RegisterShader(const char *inName, CreateShader inCreateShader)
Definition ComputeSystemCPU.h:27
Interface to run a workload on the GPU.
Definition ComputeSystem.h:15
virtual ComputeQueueResult CreateComputeQueue()=0
Create a queue for executing compute shaders.
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 ComputeShaderResult CreateComputeShader(const char *inName, uint32 inGroupSizeX, uint32 inGroupSizeY=1, uint32 inGroupSizeZ=1)=0
Compile a compute shader.
Helper class that either contains a valid result or an error.
Definition Result.h:12
Definition UnorderedMap.h:30