载入中...
搜索中...
未找到
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
44public:
46 Sequence();
48 ~Sequence();
49
50 Sequence(const Sequence &) = delete;
51 Sequence &operator=(const Sequence &) = delete;
52
55 bool isAvailable() const;
56
59 void begin();
60
67 void recordUpload(GpuBuffer *dst, const void *src, uint64_t nbytes,
68 uint64_t dstOffset = 0);
69
75 void recordDownload(GpuBuffer *src, GpuBuffer *staging, uint64_t nbytes,
76 uint64_t srcOffset = 0);
77
80 void recordDispatch(ComputeShader *shader, int groupsX, int groupsY = 1,
81 int groupsZ = 1);
82
85 void submit();
86
92 [[nodiscard]] SequenceStatus submitAsync();
93
95 [[nodiscard]] SequenceStatus poll();
96
98 [[nodiscard]] SequenceStatus wait();
99
101 SequenceStatus getStatus() const;
102
104 std::string getStatusName() const;
105
106private:
107 struct Impl;
108 Impl *impl_ = nullptr;
109};
110
111} // namespace eve::gpgpu
#define EVENGINE_API_WORLD
Definition Export.h:109
Shader * shader
size_t begin
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:20
EVENGINE_API_WORLD public API.
Definition Sequence.h:43
Sequence(const Sequence &)=delete
Sequence & operator=(const Sequence &)=delete
Fluids module — interactive surface fluid simulation.
Definition Fluids.h:35
SequenceStatus
Observable lifecycle state of a reusable GPU command sequence.
Definition Sequence.h:14