载入中...
搜索中...
未找到
Sequence.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <cstdint>
6#include <string>
7
8namespace eve::gpgpu {
9
10class ComputeShader;
11class GpuBuffer;
12
15
42public:
44 Sequence();
46 ~Sequence();
47
48 Sequence(const Sequence &) = delete;
49 Sequence &operator=(const Sequence &) = delete;
50
53 bool isAvailable() const;
54
57 void begin();
58
65 void recordUpload(GpuBuffer *dst, const void *src, uint64_t nbytes,
66 uint64_t dstOffset = 0);
67
73 void recordDownload(GpuBuffer *src, GpuBuffer *staging, uint64_t nbytes,
74 uint64_t srcOffset = 0);
75
78 void recordDispatch(ComputeShader *shader, int groupsX, int groupsY = 1,
79 int groupsZ = 1);
80
83 void submit();
84
90 [[nodiscard]] SequenceStatus submitAsync();
91
93 [[nodiscard]] SequenceStatus poll();
94
96 [[nodiscard]] SequenceStatus wait();
97
99 SequenceStatus getStatus() const;
100
102 std::string getStatusName() const;
103
104private:
105 struct Impl;
106 Impl *impl_ = nullptr;
107};
108
109} // namespace eve::gpgpu
#define EVENGINE_API_WORLD
Definition Export.h:109
float begin
Shader * shader
Backend-agnostic compute program. Bind storage buffers then dispatch via Gpgpu::dispatch....
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
Sequence(const Sequence &)=delete
Sequence & operator=(const Sequence &)=delete
Fluids module — interactive surface fluid simulation.
Definition Fluids.h:34
SequenceStatus
Observable lifecycle state of a reusable GPU command sequence.
Definition Sequence.h:14