载入中...
搜索中...
未找到
Gpgpu.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Module.h"
7
8#include <string>
9
10namespace eve::gpgpu {
11
12class ComputeShader;
13class GpuBuffer;
14class Sequence;
15
24public:
27 Gpgpu();
29 ~Gpgpu() override;
30
33
35 bool isAvailable() const;
36
42 ComputeShader *newShader(const std::string &source);
43
45 ComputeShader *newShaderFromBytecode(const std::string &path);
46
48 ComputeShader *newShaderFromSpvFile(const std::string &path);
49
54 GpuBuffer *newBuffer(int byteSize, const std::string &usage = "storage");
55
61 Sequence *newSequence();
62
67 void dispatch(ComputeShader *shader, int groupsX, int groupsY = 1, int groupsZ = 1);
68};
69
70} // namespace eve::gpgpu
std::string usage
#define EVENGINE_API_WORLD
Definition Export.h:109
const GltfImportRequest & request
std::string path
Definition PlayHost.cpp:110
Shader * shader
const UnitySourceAsset & source
Optional synchronous device-thread service for mesh sculpt and damage compute.
EVENGINE_API_FOUNDATION public API.
Definition Module.h:46
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Backend-agnostic compute program. Bind storage buffers then dispatch via Gpgpu::dispatch....
GPGPU module — compute shaders + storage buffers via the active Graphics backend. Uses the graphics q...
Definition Gpgpu.h:23
Backend-agnostic GPU buffer for compute (storage) or CPU staging transfers. Squirrel-owned; derived c...
Definition GpuBuffer.h:18
EVENGINE_API_WORLD public API.
Definition Sequence.h:41
Fluids module — interactive surface fluid simulation.
Definition Fluids.h:34
Owning, backend-neutral input for one synchronous GPU mesh deformation.