载入中...
搜索中...
未找到
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
55 GpuBuffer *newBuffer(int byteSize, const std::string &usage = "storage");
56
62 Sequence *newSequence();
63
68 void dispatch(ComputeShader *shader, int groupsX, int groupsY = 1, int groupsZ = 1);
69};
70
71} // namespace eve::gpgpu
std::string usage
#define EVENGINE_API_WORLD
Definition Export.h:109
const GltfImportRequest & request
std::string path
Definition PlayHost.cpp:111
Shader * shader
std::string_view source
Optional synchronous device-thread service for mesh sculpt and damage compute.
EVENGINE_API_FOUNDATION public API.
Definition Module.h:48
Move-only operation result carrying either a value or Status.
Definition Result.h:176
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:20
EVENGINE_API_WORLD public API.
Definition Sequence.h:43
Fluids module — interactive surface fluid simulation.
Definition Fluids.h:35
Owning, backend-neutral input for one synchronous GPU mesh deformation.