Fluids module — interactive surface fluid simulation. 更多...
类 | |
| class | ComputeShader |
| Backend-agnostic compute program. Bind storage buffers then dispatch via Gpgpu::dispatch. Push constants: float[32] (same size as graphics::Shader). 更多... | |
| class | EcsGpuWorkspace |
| Reusable typed CPU staging for a GPU ECS component stream. Ownership stays with the caller; one workspace must not be used concurrently. 更多... | |
| class | Gpgpu |
| GPGPU module — compute shaders + storage buffers via the active Graphics backend. Uses the graphics queue when no dedicated compute family exists (Apple/MoltenVK). 更多... | |
| class | GpuBuffer |
| Backend-agnostic GPU buffer for compute (storage) or CPU staging transfers. Squirrel-owned; derived class destroys GPU resources in destructor. 更多... | |
| class | Sequence |
| EVENGINE_API_WORLD public API. 更多... | |
| class | ShaderSystem |
| EVENGINE_API_WORLD public API. 更多... | |
| class | VulkanComputeShader |
| Vulkan 计算着色器(SPIR-V pipeline + descriptor 管理)。 更多... | |
| class | VulkanGpuBuffer |
| Vulkan 计算缓冲区实现(storage/vertex buffer + device memory)。 更多... | |
| struct | VulkanSequence |
| VulkanSequence public API. 更多... | |
| class | WebGpuComputeShader |
| Compute program for the WebGPU backend. Accepts WGSL source; GLSL/SPIR-V input is rejected (browsers only accept WGSL at runtime). 更多... | |
| class | WebGpuGpuBuffer |
| Storage / staging buffer for the WebGPU backend. 更多... | |
| class | WebGpuSequence |
枚举 | |
| enum class | SequenceStatus : uint8_t { Idle , Recording , Submitted , Complete , Failed } |
| Observable lifecycle state of a reusable GPU command sequence. 更多... | |
函数 | |
| EVENGINE_API_WORLD Result< std::vector< uint32_t > > | compileComputeSpirv (const std::string &source) |
| Compile GLSL compute source to owning SPIR-V without accessing Graphics or a GPU. | |
| EVENGINE_API_WORLD Result< std::unique_ptr< ComputeShader > > | createComputeShader (const std::vector< uint32_t > &words) |
| Create an owning compute pipeline from valid SPIR-V produced by compileComputeSpirv. | |
| template<typename Comp > | |
| constexpr int | componentFloatCount () |
| Component float count. | |
| template<typename Base , typename Comp > | |
| int | countViewEntities () |
| Count live entities matching View<Base, Comp>. | |
| template<typename Base , typename Comp > | |
| int | packViewComponent (ShaderSystem &sys, int binding, EcsGpuWorkspace< Comp > &workspace) |
| Pack View<Base, Comp> into ShaderSystem binding as AoS floats. Returns entity count (0 if empty). | |
| template<typename Base , typename Comp > | |
| int | packViewComponent (ShaderSystem &sys, int binding) |
| Compatibility overload that uses a temporary staging workspace. | |
| template<typename Base , typename Comp > | |
| void | unpackViewComponent (ShaderSystem &sys, int binding, int count, EcsGpuWorkspace< Comp > &workspace) |
Write ShaderSystem binding floats back into View<Base, Comp> (same order as pack). count should be the value returned by packViewComponent. | |
| template<typename Base , typename Comp > | |
| void | unpackViewComponent (ShaderSystem &sys, int binding, int count) |
| Compatibility overload that uses a temporary staging workspace. | |
| template<typename Base , typename Comp > | |
| int | packViewComponentRange (ShaderSystem &sys, int binding, int firstEntity, int entityCount, EcsGpuWorkspace< Comp > &workspace) |
| Pack a stable contiguous View range into an existing resident buffer. The full buffer must have been allocated by a prior full pack/ensureBuffer. | |
| template<typename Base , typename Comp > | |
| int | unpackViewComponentRange (ShaderSystem &sys, int binding, int firstEntity, int entityCount, EcsGpuWorkspace< Comp > &workspace) |
| Unpack a stable contiguous resident-buffer range into a matching View range. | |
| template<typename Base , typename Comp > | |
| int | runViewComponentSystem (ShaderSystem &sys, int binding, float dt) |
| Pack + dispatch + unpack a single-component GPU system. Additional bindings must be uploaded by the caller before this helper, or use ShaderSystem manually for multi-buffer systems. | |
| int | packScriptEntityFloats (ssq::Object entities, const std::string &slot, ssq::Object fields, GpuBuffer *buf) |
| Pack script ECS entities' component number fields into a GpuBuffer (AoS). | |
| int | packScriptEntityFloatsRange (ssq::Object entities, const std::string &slot, ssq::Object fields, GpuBuffer *buf, int firstEntity, int entityCount) |
| Pack a contiguous entity range into the matching range of an existing buffer. | |
| int | unpackScriptEntityFloats (ssq::Object entities, const std::string &slot, ssq::Object fields, GpuBuffer *buf, int entityCount) |
Inverse of packScriptEntityFloats: write buffer rows back into component fields. | |
| int | unpackScriptEntityFloatsRange (ssq::Object entities, const std::string &slot, ssq::Object fields, GpuBuffer *buf, int firstEntity, int entityCount) |
| Unpack a contiguous buffer range into the matching stable ECS view range. | |
| Module_IMPL (Gpgpu, new Gpgpu()) | |
| bool | vulkanGpgpuReady () |
| Vulkan 后端是否就绪(设备/队列可用)。 | |
| ComputeShader * | vulkanNewShaderFromSpirv (const std::vector< uint32_t > &spv) |
| 从 SPIR-V 字节码创建计算着色器。 | |
| GpuBuffer * | vulkanNewBuffer (int byteSize, const std::string &usage) |
| 创建 GPU 存储/传输缓冲区;usage 为 "storage" | "vertex" 等。 | |
| void | vulkanDispatch (ComputeShader *shader, int groupsX, int groupsY, int groupsZ) |
| 派发计算着色器(groupsX/Y/Z 为线程组数)。 | |
| VulkanSequence * | vulkanSequenceCreate () |
| Vulkan sequence create. | |
| void | vulkanSequenceDestroy (VulkanSequence *seq) |
| Vulkan sequence destroy. | |
| void | vulkanSequenceBegin (VulkanSequence *seq) |
| Vulkan sequence begin. | |
| void | vulkanSequenceRecordUpload (VulkanSequence *seq, GpuBuffer *dst, const void *src, uint64_t nbytes, uint64_t dstOffset) |
| Vulkan sequence record upload. | |
| void | vulkanSequenceRecordDownload (VulkanSequence *seq, GpuBuffer *src, GpuBuffer *staging, uint64_t nbytes, uint64_t srcOffset) |
| Vulkan sequence record download. | |
| void | vulkanSequenceRecordDispatch (VulkanSequence *seq, ComputeShader *shader, int groupsX, int groupsY, int groupsZ) |
| Vulkan sequence record dispatch. | |
| void | vulkanSequenceSubmit (VulkanSequence *seq) |
| Vulkan sequence submit. | |
| SequenceStatus | vulkanSequenceSubmitAsync (VulkanSequence *seq) |
| Vulkan sequence submit async. | |
| SequenceStatus | vulkanSequencePoll (VulkanSequence *seq) |
| Vulkan sequence poll. | |
| SequenceStatus | vulkanSequenceWait (VulkanSequence *seq) |
| Vulkan sequence wait. | |
| SequenceStatus | vulkanSequenceStatus (const VulkanSequence *seq) |
| Vulkan sequence status. | |
| graphics::vulkan::Graphics * | requireVulkanGraphics () |
| Resolve live Vulkan Graphics (throws if missing / not initialized). | |
| bool | vulkanGraphicsReady () |
| True if Vulkan Graphics device is ready. | |
| vk::Queue | computeQueue (graphics::vulkan::Graphics *vkg) |
| Computes queue. | |
| vk::CommandPool | computeCommandPool (graphics::vulkan::Graphics *vkg) |
| Computes command pool. | |
| std::vector< uint32_t > | loadSpirvFile (const std::string &path) |
| Loads spirv file. | |
| std::vector< uint32_t > | compileComputeGlsl (const std::string &glsl) |
| Compiles compute glsl. | |
| bool | webgpuGpgpuReady () |
| Webgpu gpgpu ready. | |
| WebGpuComputeShader * | webgpuNewShaderFromWgsl (const std::string &wgsl) |
| Webgpu new shader from wgsl. | |
| WebGpuComputeShader * | webgpuNewShaderFromSpirv (const std::vector< uint32_t > &spv) |
| Webgpu new shader from spirv. | |
| WebGpuGpuBuffer * | webgpuNewBuffer (int byteSize, const std::string &usage) |
| Webgpu new buffer. | |
| void | webgpuDispatch (ComputeShader *shader, int groupsX, int groupsY, int groupsZ) |
| Webgpu dispatch. | |
| WebGpuSequence * | webgpuSequenceCreate () |
| Webgpu sequence create. | |
| void | webgpuSequenceDestroy (WebGpuSequence *sequence) |
| Webgpu sequence destroy. | |
| bool | webgpuSequenceReady (WebGpuSequence *sequence) |
| Webgpu sequence ready. | |
| void | webgpuSequenceBegin (WebGpuSequence *sequence) |
| Webgpu sequence begin. | |
| void | webgpuSequenceRecordUpload (WebGpuSequence *sequence, GpuBuffer *dst, const void *src, uint64_t nbytes, uint64_t dstOffset) |
| Webgpu sequence record upload. | |
| void | webgpuSequenceRecordDownload (WebGpuSequence *sequence, GpuBuffer *src, GpuBuffer *staging, uint64_t nbytes, uint64_t srcOffset) |
| Webgpu sequence record download. | |
| void | webgpuSequenceRecordDispatch (WebGpuSequence *sequence, ComputeShader *shader, int groupsX, int groupsY, int groupsZ) |
| Webgpu sequence record dispatch. | |
| SequenceStatus | webgpuSequenceSubmitAsync (WebGpuSequence *sequence) |
| Webgpu sequence submit async. | |
| SequenceStatus | webgpuSequencePoll (WebGpuSequence *sequence) |
| Webgpu sequence poll. | |
| SequenceStatus | webgpuSequenceWait (WebGpuSequence *sequence) |
| Webgpu sequence wait. | |
| SequenceStatus | webgpuSequenceStatus (const WebGpuSequence *sequence) |
| Webgpu sequence status. | |
| void | webgpuSequenceSubmit (WebGpuSequence *sequence) |
| Webgpu sequence submit. | |
详细描述
Fluids module — interactive surface fluid simulation.
Screen-space fluid surface reconstruction (SSF).
Particles are constrained to mesh SDFs, flow down the surface under tangential gravity, and (later phases) form droplets through cohesion / surface tension. The solver runs on the GPU through the gpgpu module with a CPU reference implementation; the screen-space surface reconstruction pipeline consumes the same particle buffers.
Splats particles into a depth/thickness buffer, bilaterally smooths the depth (curvature-flow style), reconstructs normals from depth gradients and shades the result as either water (Fresnel + refraction look) or mud (diffuse, thickness-attenuated). Projected particle discs carry spherical-cap depth and chord thickness. The CPU reference mirrors the GLSL algorithms in FluidSsfKernels.h; GPU depth and thickness use fixed-point quantization. This disc approximation is not an exact perspective ray/sphere intersection. The GPU path runs on the gpgpu compute queue.
枚举类型说明
◆ SequenceStatus
|
strong |
Observable lifecycle state of a reusable GPU command sequence.
| 枚举值 | |
|---|---|
| Idle | |
| Recording | |
| Submitted | |
| Complete | |
| Failed | |
在文件 Sequence.h 第 14 行定义.
函数说明
◆ compileComputeGlsl()
| std::vector< uint32_t > eve::gpgpu::compileComputeGlsl | ( | const std::string & | glsl | ) |
Compiles compute glsl.
在文件 VulkanUtil.cpp 第 88 行定义.
引用了 eve::graphics::compileGlslToSpirv(), eve::graphics::eCompute , 以及 error.
被这些函数引用 compileComputeSpirv().
◆ compileComputeSpirv()
| Result< std::vector< uint32_t > > eve::gpgpu::compileComputeSpirv | ( | const std::string & | source | ) |
Compile GLSL compute source to owning SPIR-V without accessing Graphics or a GPU.
- 参数
-
source Borrowed until return; independent calls may execute concurrently on worker threads.
- 返回
- Owning words, compilation diagnostic, or Unsupported on WebGPU. No callbacks; each thread retains its own compiler context until thread exit.
引用了 compileComputeGlsl(), eve::Diagnostic::error(), eve::Failed, source , 以及 eve::Unsupported.
被这些函数引用 eve::tensor::onnx_detail::CompilerQueue::enqueue() , 以及 eve::gpgpu::Gpgpu::newShader().
◆ componentFloatCount()
|
constexpr |
◆ computeCommandPool()
| vk::CommandPool eve::gpgpu::computeCommandPool | ( | graphics::vulkan::Graphics * | vkg | ) |
Computes command pool.
在文件 VulkanUtil.cpp 第 77 行定义.
引用了 eve::graphics::vulkan::Graphics::getUploadPool().
被这些函数引用 eve::gpgpu::VulkanGpuBuffer::downloadBytes(), eve::gpgpu::VulkanSequence::ensureReady(), eve::gpgpu::VulkanGpuBuffer::uploadBytes() , 以及 vulkanDispatch().
◆ computeQueue()
| vk::Queue eve::gpgpu::computeQueue | ( | graphics::vulkan::Graphics * | vkg | ) |
Computes queue.
在文件 VulkanUtil.cpp 第 66 行定义.
引用了 compute, device , 以及 eve::graphics::vulkan::Graphics::getDevice().
被这些函数引用 eve::gpgpu::VulkanGpuBuffer::downloadBytes(), eve::gpgpu::VulkanSequence::ensureReady(), eve::gpgpu::VulkanGpuBuffer::uploadBytes() , 以及 vulkanDispatch().
◆ countViewEntities()
| int eve::gpgpu::countViewEntities | ( | ) |
◆ createComputeShader()
| Result< std::unique_ptr< ComputeShader > > eve::gpgpu::createComputeShader | ( | const std::vector< uint32_t > & | words | ) |
Create an owning compute pipeline from valid SPIR-V produced by compileComputeSpirv.
- 参数
-
words Borrowed only until return; must contain a valid compute entry point named main.
- 返回
- Owning shader or a diagnostic; Unsupported on WebGPU.
- 注解
- Device thread only, no concurrent calls/reentrancy or Graphics retirement during the call. The caller must destroy the shader before the active Graphics device retires.
引用了 eve::Diagnostic::error(), eve::Failed, eve::InvalidArgument, eve::Unsupported , 以及 vulkanNewShaderFromSpirv().
被这些函数引用 eve::fluids::OceanGpuSpectrumBuilder::build() , 以及 eve::gpgpu::Gpgpu::newShader().
◆ loadSpirvFile()
| std::vector< uint32_t > eve::gpgpu::loadSpirvFile | ( | const std::string & | path | ) |
◆ Module_IMPL()
| eve::gpgpu::Module_IMPL | ( | Gpgpu | , |
| new | Gpgpu() | ||
| ) |
◆ packScriptEntityFloats()
| EVENGINE_API_WORLD int eve::gpgpu::packScriptEntityFloats | ( | ssq::Object | entities, |
| const std::string & | slot, | ||
| ssq::Object | fields, | ||
| GpuBuffer * | buf | ||
| ) |
Pack script ECS entities' component number fields into a GpuBuffer (AoS).
- 参数
-
entities Squirrel array of entity instances (as returned by eve.view).slot Component slot name on the entity, e.g. "pos".fields Squirrel array of field name strings, e.g. ["x", "y"].buf Destination buffer; must already be large enough for every packed row.
- 返回
- Number of entities packed (0 for an empty view or a non-array argument).
- 异常
-
`Exception` when the slot is missing, a field is absent or non-numeric, or the buffer is too small — a partially packed row is never reported as success. @cost 与"实体数 × 字段数"成正比,一次 Squirrel 字段读加一次 buffer 写入;按帧调用时是逐帧 成本,所以 GPU-resident 场景应优先用 ShaderSystem的区间上传(packEcsFloatsRange), 它只重传变化的那一段。
- 备注
- 字段来源是引擎侧那一个权威存储(§9.65 的
readScriptComponentField):登记过的组件 字段在存储里、没登记的在实例槽位里,这里不需要知道区别。行顺序必须与eve.view的 稳定顺序(实体 id 升序)一致,因为回读按同一行号寻址。
在文件 EcsScriptPack.cpp 第 98 行定义.
引用了 packScriptEntityFloatsRange() , 以及 slot.
◆ packScriptEntityFloatsRange()
| EVENGINE_API_WORLD int eve::gpgpu::packScriptEntityFloatsRange | ( | ssq::Object | entities, |
| const std::string & | slot, | ||
| ssq::Object | fields, | ||
| GpuBuffer * | buf, | ||
| int | firstEntity, | ||
| int | entityCount | ||
| ) |
Pack a contiguous entity range into the matching range of an existing buffer.
- 参数
-
entities Squirrel array of entity instances. slot Component slot name on the entity. fields Squirrel array of field name strings. buf Destination buffer. firstEntity First entity in the stable ECS view. entityCount Number of entities to pack; values past the view are clamped.
- 返回
- Number of entities packed.
- 异常
-
As packScriptEntityFloats. @cost 与entityCount × 字段数成正比;这是 GPU-resident 的逐帧路径,只应传真正变化的那一段。
在文件 EcsScriptPack.cpp 第 103 行定义.
引用了 entity, f, fields, first, eve::gpgpu::GpuBuffer::getSize(), n, slot, top, v, vm , 以及 eve::gpgpu::GpuBuffer::writeFloat32s().
被这些函数引用 packScriptEntityFloats().
◆ packViewComponent() [1/2]
| int eve::gpgpu::packViewComponent | ( | ShaderSystem & | sys, |
| int | binding | ||
| ) |
◆ packViewComponent() [2/2]
| int eve::gpgpu::packViewComponent | ( | ShaderSystem & | sys, |
| int | binding, | ||
| EcsGpuWorkspace< Comp > & | workspace | ||
| ) |
Pack View<Base, Comp> into ShaderSystem binding as AoS floats. Returns entity count (0 if empty).
Pack view component.
Memcpy.
引用了 binding, n, eve::gpgpu::ShaderSystem::upload() , 以及 view.
◆ packViewComponentRange()
| int eve::gpgpu::packViewComponentRange | ( | ShaderSystem & | sys, |
| int | binding, | ||
| int | firstEntity, | ||
| int | entityCount, | ||
| EcsGpuWorkspace< Comp > & | workspace | ||
| ) |
Pack a stable contiguous View range into an existing resident buffer. The full buffer must have been allocated by a prior full pack/ensureBuffer.
Pack view component range.
Memcpy.
引用了 binding, eve::gpgpu::ShaderSystem::uploadRange() , 以及 view.
◆ requireVulkanGraphics()
| graphics::vulkan::Graphics * eve::gpgpu::requireVulkanGraphics | ( | ) |
Resolve live Vulkan Graphics (throws if missing / not initialized).
在文件 VulkanUtil.cpp 第 44 行定义.
被这些函数引用 eve::gpgpu::VulkanGpuBuffer::downloadBytes(), eve::gpgpu::VulkanSequence::ensureReady(), eve::gpgpu::VulkanGpuBuffer::uploadBytes(), vulkanDispatch(), vulkanNewBuffer() , 以及 vulkanNewShaderFromSpirv().
◆ runViewComponentSystem()
| int eve::gpgpu::runViewComponentSystem | ( | ShaderSystem & | sys, |
| int | binding, | ||
| float | dt | ||
| ) |
Pack + dispatch + unpack a single-component GPU system. Additional bindings must be uploaded by the caller before this helper, or use ShaderSystem manually for multi-buffer systems.
Run view component system.
引用了 binding, eve::gpgpu::ShaderSystem::dispatch(), dt , 以及 n.
◆ unpackScriptEntityFloats()
| EVENGINE_API_WORLD int eve::gpgpu::unpackScriptEntityFloats | ( | ssq::Object | entities, |
| const std::string & | slot, | ||
| ssq::Object | fields, | ||
| GpuBuffer * | buf, | ||
| int | entityCount | ||
| ) |
Inverse of packScriptEntityFloats: write buffer rows back into component fields.
- 参数
-
entities Squirrel array of entity instances. slot Component slot name on the entity. fields Squirrel array of field name strings. buf Source buffer. entityCount Number of entities to write back; should match the pack result.
- 返回
- Number of entities unpacked.
- 异常
-
As packScriptEntityFloats. @cost 与entityCount × 字段数成正比,每个字段一次 Squirrel 写入;回读一帧后应当停止继续 在 GPU 上迭代(见docs/usr/modules/gpgpu.md的 GPU-resident 说明)。
在文件 EcsScriptPack.cpp 第 172 行定义.
引用了 slot , 以及 unpackScriptEntityFloatsRange().
◆ unpackScriptEntityFloatsRange()
| EVENGINE_API_WORLD int eve::gpgpu::unpackScriptEntityFloatsRange | ( | ssq::Object | entities, |
| const std::string & | slot, | ||
| ssq::Object | fields, | ||
| GpuBuffer * | buf, | ||
| int | firstEntity, | ||
| int | entityCount | ||
| ) |
Unpack a contiguous buffer range into the matching stable ECS view range.
- 参数
-
entities Squirrel array of entity instances. slot Component slot name on the entity. fields Squirrel array of field name strings. buf Source buffer. firstEntity First entity and first packed record to read. entityCount Number of entities to unpack; values past the view are clamped.
- 返回
- Number of entities unpacked.
- 异常
-
As packScriptEntityFloats. @cost 与entityCount × 字段数成正比;配合requestReadbackRange时只回读关心的区间。
在文件 EcsScriptPack.cpp 第 177 行定义.
引用了 entity, f, fields, first, eve::gpgpu::GpuBuffer::getSize(), n, eve::gpgpu::GpuBuffer::readFloat32s(), slot, top, v , 以及 vm.
被这些函数引用 unpackScriptEntityFloats().
◆ unpackViewComponent() [1/2]
| void eve::gpgpu::unpackViewComponent | ( | ShaderSystem & | sys, |
| int | binding, | ||
| int | count | ||
| ) |
◆ unpackViewComponent() [2/2]
| void eve::gpgpu::unpackViewComponent | ( | ShaderSystem & | sys, |
| int | binding, | ||
| int | count, | ||
| EcsGpuWorkspace< Comp > & | workspace | ||
| ) |
Write ShaderSystem binding floats back into View<Base, Comp> (same order as pack). count should be the value returned by packViewComponent.
Unpack view component.
Memcpy.
引用了 binding, count, eve::gpgpu::ShaderSystem::download() , 以及 view.
◆ unpackViewComponentRange()
| int eve::gpgpu::unpackViewComponentRange | ( | ShaderSystem & | sys, |
| int | binding, | ||
| int | firstEntity, | ||
| int | entityCount, | ||
| EcsGpuWorkspace< Comp > & | workspace | ||
| ) |
◆ vulkanDispatch()
| EVENGINE_API_WORLD void eve::gpgpu::vulkanDispatch | ( | ComputeShader * | shader, |
| int | groupsX, | ||
| int | groupsY, | ||
| int | groupsZ | ||
| ) |
派发计算着色器(groupsX/Y/Z 为线程组数)。
在文件 VulkanGpgpu.cpp 第 124 行定义.
引用了 computeCommandPool(), computeQueue(), device, eve::gpgpu::ComputeShader::kPushConstantBytes, requireVulkanGraphics() , 以及 shader.
被这些函数引用 eve::gpgpu::Gpgpu::dispatch() , 以及 eve::virtualgeometry::vgUpdate().
◆ vulkanGpgpuReady()
| bool eve::gpgpu::vulkanGpgpuReady | ( | ) |
◆ vulkanGraphicsReady()
| bool eve::gpgpu::vulkanGraphicsReady | ( | ) |
◆ vulkanNewBuffer()
| EVENGINE_API_WORLD GpuBuffer * eve::gpgpu::vulkanNewBuffer | ( | int | byteSize, |
| const std::string & | usage | ||
| ) |
创建 GPU 存储/传输缓冲区;usage 为 "storage" | "vertex" 等。
在文件 VulkanGpgpu.cpp 第 65 行定义.
引用了 b, device, flags, info, requireVulkanGraphics(), result , 以及 usage.
被这些函数引用 eve::gpgpu::Gpgpu::newBuffer(), eve::virtualgeometry::vgReset(), eve::virtualgeometry::vgUpload() , 以及 eve::virtualgeometry::vgUploadUniforms().
◆ vulkanNewShaderFromSpirv()
| EVENGINE_API_WORLD ComputeShader * eve::gpgpu::vulkanNewShaderFromSpirv | ( | const std::vector< uint32_t > & | spv | ) |
从 SPIR-V 字节码创建计算着色器。
在文件 VulkanGpgpu.cpp 第 13 行定义.
引用了 b, bindings, device, eve::gpgpu::ComputeShader::kMaxBindings, eve::gpgpu::ComputeShader::kPushConstantBytes, requireVulkanGraphics(), result , 以及 shader.
被这些函数引用 createComputeShader() , 以及 eve::gpgpu::Gpgpu::newShaderFromBytecode().
◆ vulkanSequenceBegin()
| void eve::gpgpu::vulkanSequenceBegin | ( | VulkanSequence * | seq | ) |
Vulkan sequence begin.
在文件 VulkanSequence.cpp 第 108 行定义.
引用了 eve::gpgpu::VulkanSequence::ensureCommandBuffer(), eve::gpgpu::VulkanSequence::ensureReady() , 以及 eve::gpgpu::VulkanSequence::stagingUsed.
被这些函数引用 eve::gpgpu::Sequence::begin().
◆ vulkanSequenceCreate()
| VulkanSequence * eve::gpgpu::vulkanSequenceCreate | ( | ) |
Vulkan sequence create.
在文件 VulkanSequence.cpp 第 31 行定义.
◆ vulkanSequenceDestroy()
| void eve::gpgpu::vulkanSequenceDestroy | ( | VulkanSequence * | seq | ) |
Vulkan sequence destroy.
在文件 VulkanSequence.cpp 第 102 行定义.
引用了 eve::gpgpu::VulkanSequence::destroy().
被这些函数引用 eve::gpgpu::Sequence::~Sequence().
◆ vulkanSequencePoll()
| SequenceStatus eve::gpgpu::vulkanSequencePoll | ( | VulkanSequence * | seq | ) |
Vulkan sequence poll.
在文件 VulkanSequence.cpp 第 261 行定义.
引用了 Complete, Failed, eve::gpgpu::VulkanSequence::fence, eve::graphics::vulkan::Graphics::getDevice(), result, eve::gpgpu::VulkanSequence::status, Submitted , 以及 eve::gpgpu::VulkanSequence::vkg.
被这些函数引用 eve::gpgpu::Sequence::poll().
◆ vulkanSequenceRecordDispatch()
| void eve::gpgpu::vulkanSequenceRecordDispatch | ( | VulkanSequence * | seq, |
| ComputeShader * | shader, | ||
| int | groupsX, | ||
| int | groupsY, | ||
| int | groupsZ | ||
| ) |
Vulkan sequence record dispatch.
在文件 VulkanSequence.cpp 第 170 行定义.
引用了 binding, buffer, eve::gpgpu::VulkanSequence::commandBuffer, device, eve::gpgpu::VulkanSequence::ensureCommandBuffer(), eve::gpgpu::VulkanComputeShader::getBoundBuffer(), eve::graphics::vulkan::Graphics::getDevice(), eve::gpgpu::ComputeShader::kMaxBindings, eve::gpgpu::ComputeShader::kPushConstantBytes, eve::gpgpu::VulkanSequence::queue, shader, eve::gpgpu::VulkanSequence::usedShaders , 以及 eve::gpgpu::VulkanSequence::vkg.
◆ vulkanSequenceRecordDownload()
| void eve::gpgpu::vulkanSequenceRecordDownload | ( | VulkanSequence * | seq, |
| GpuBuffer * | src, | ||
| GpuBuffer * | staging, | ||
| uint64_t | nbytes, | ||
| uint64_t | srcOffset | ||
| ) |
Vulkan sequence record download.
在文件 VulkanSequence.cpp 第 149 行定义.
引用了 eve::gpgpu::VulkanSequence::commandBuffer , 以及 eve::gpgpu::VulkanSequence::ensureCommandBuffer().
◆ vulkanSequenceRecordUpload()
| void eve::gpgpu::vulkanSequenceRecordUpload | ( | VulkanSequence * | seq, |
| GpuBuffer * | dst, | ||
| const void * | src, | ||
| uint64_t | nbytes, | ||
| uint64_t | dstOffset | ||
| ) |
Vulkan sequence record upload.
在文件 VulkanSequence.cpp 第 115 行定义.
引用了 eve::gpgpu::VulkanSequence::commandBuffer, device, eve::gpgpu::VulkanSequence::ensureCommandBuffer(), eve::graphics::vulkan::Graphics::getDevice(), eve::gpgpu::VulkanSequence::stagingPool, eve::gpgpu::VulkanSequence::stagingUsed , 以及 eve::gpgpu::VulkanSequence::vkg.
被这些函数引用 eve::gpgpu::Sequence::recordUpload().
◆ vulkanSequenceStatus()
| SequenceStatus eve::gpgpu::vulkanSequenceStatus | ( | const VulkanSequence * | seq | ) |
Vulkan sequence status.
在文件 VulkanSequence.cpp 第 276 行定义.
引用了 Failed , 以及 eve::gpgpu::VulkanSequence::status.
被这些函数引用 eve::gpgpu::Sequence::getStatus().
◆ vulkanSequenceSubmit()
| void eve::gpgpu::vulkanSequenceSubmit | ( | VulkanSequence * | seq | ) |
Vulkan sequence submit.
在文件 VulkanSequence.cpp 第 211 行定义.
引用了 Complete, Failed, vulkanSequenceSubmitAsync() , 以及 vulkanSequenceWait().
被这些函数引用 eve::gpgpu::Sequence::submit().
◆ vulkanSequenceSubmitAsync()
| SequenceStatus eve::gpgpu::vulkanSequenceSubmitAsync | ( | VulkanSequence * | seq | ) |
Vulkan sequence submit async.
在文件 VulkanSequence.cpp 第 217 行定义.
引用了 eve::gpgpu::VulkanSequence::commandBuffer, device, eve::gpgpu::VulkanSequence::ensureReady(), Failed, eve::gpgpu::VulkanSequence::fence, eve::graphics::vulkan::Graphics::getDevice(), eve::gpgpu::VulkanSequence::queue, eve::gpgpu::VulkanSequence::recording, eve::gpgpu::VulkanSequence::status, Submitted, eve::gpgpu::VulkanSequence::submittedCommandBuffer , 以及 eve::gpgpu::VulkanSequence::vkg.
被这些函数引用 eve::gpgpu::Sequence::submitAsync() , 以及 vulkanSequenceSubmit().
◆ vulkanSequenceWait()
| SequenceStatus eve::gpgpu::vulkanSequenceWait | ( | VulkanSequence * | seq | ) |
Vulkan sequence wait.
在文件 VulkanSequence.cpp 第 269 行定义.
引用了 Complete, Failed, eve::gpgpu::VulkanSequence::fence, eve::graphics::vulkan::Graphics::getDevice(), result, eve::gpgpu::VulkanSequence::status, Submitted , 以及 eve::gpgpu::VulkanSequence::vkg.
被这些函数引用 eve::gpgpu::VulkanSequence::destroy(), vulkanSequenceSubmit() , 以及 eve::gpgpu::Sequence::wait().
◆ webgpuDispatch()
| EVENGINE_API_WORLD void eve::gpgpu::webgpuDispatch | ( | ComputeShader * | shader, |
| int | groupsX, | ||
| int | groupsY, | ||
| int | groupsZ | ||
| ) |
Webgpu dispatch.
在文件 WebGpuGpgpu.cpp 第 231 行定义.
引用了 eve::gpgpu::WebGpuGpuBuffer::buffer, device, entries, eve::gpgpu::ComputeShader::kMaxBindings, eve::gpgpu::ComputeShader::kPushConstantBytes, shader , 以及 webgpuNewBuffer().
被这些函数引用 eve::gpgpu::Gpgpu::dispatch().
◆ webgpuGpgpuReady()
| bool eve::gpgpu::webgpuGpgpuReady | ( | ) |
Webgpu gpgpu ready.
在文件 WebGpuGpgpu.cpp 第 46 行定义.
被这些函数引用 eve::gpgpu::Gpgpu::isAvailable() , 以及 webgpuSequenceReady().
◆ webgpuNewBuffer()
| EVENGINE_API_WORLD WebGpuGpuBuffer * eve::gpgpu::webgpuNewBuffer | ( | int | byteSize, |
| const std::string & | usage | ||
| ) |
Webgpu new buffer.
在文件 WebGpuGpgpu.cpp 第 150 行定义.
被这些函数引用 eve::gpgpu::Gpgpu::newBuffer() , 以及 webgpuDispatch().
◆ webgpuNewShaderFromSpirv()
| EVENGINE_API_WORLD WebGpuComputeShader * eve::gpgpu::webgpuNewShaderFromSpirv | ( | const std::vector< uint32_t > & | spv | ) |
Webgpu new shader from spirv.
在文件 WebGpuGpgpu.cpp 第 144 行定义.
◆ webgpuNewShaderFromWgsl()
| EVENGINE_API_WORLD WebGpuComputeShader * eve::gpgpu::webgpuNewShaderFromWgsl | ( | const std::string & | wgsl | ) |
Webgpu new shader from wgsl.
在文件 WebGpuGpgpu.cpp 第 84 行定义.
引用了 device, entries, eve::gpgpu::ComputeShader::kMaxBindings, eve::gpgpu::ComputeShader::kPushConstantBytes , 以及 shader.
被这些函数引用 eve::gpgpu::Gpgpu::newShader() , 以及 eve::gpgpu::Gpgpu::newShaderFromBytecode().
◆ webgpuSequenceBegin()
| void eve::gpgpu::webgpuSequenceBegin | ( | WebGpuSequence * | sequence | ) |
Webgpu sequence begin.
在文件 WebGpuGpgpu.cpp 第 389 行定义.
引用了 Recording, sequence, Submitted , 以及 webgpuSequenceReady().
◆ webgpuSequenceCreate()
| WebGpuSequence * eve::gpgpu::webgpuSequenceCreate | ( | ) |
Webgpu sequence create.
在文件 WebGpuGpgpu.cpp 第 381 行定义.
◆ webgpuSequenceDestroy()
| void eve::gpgpu::webgpuSequenceDestroy | ( | WebGpuSequence * | sequence | ) |
Webgpu sequence destroy.
在文件 WebGpuGpgpu.cpp 第 382 行定义.
引用了 sequence, Submitted , 以及 webgpuSequenceWait().
◆ webgpuSequencePoll()
| SequenceStatus eve::gpgpu::webgpuSequencePoll | ( | WebGpuSequence * | sequence | ) |
◆ webgpuSequenceReady()
| bool eve::gpgpu::webgpuSequenceReady | ( | WebGpuSequence * | sequence | ) |
Webgpu sequence ready.
在文件 WebGpuGpgpu.cpp 第 387 行定义.
引用了 sequence , 以及 webgpuGpgpuReady().
被这些函数引用 webgpuSequenceBegin() , 以及 webgpuSequenceSubmitAsync().
◆ webgpuSequenceRecordDispatch()
| void eve::gpgpu::webgpuSequenceRecordDispatch | ( | WebGpuSequence * | sequence, |
| ComputeShader * | shader, | ||
| int | groupsX, | ||
| int | groupsY, | ||
| int | groupsZ | ||
| ) |
Webgpu sequence record dispatch.
在文件 WebGpuGpgpu.cpp 第 424 行定义.
引用了 eve::gpgpu::WebGpuSequence::Dispatch::bindings, compute, eve::gpgpu::WebGpuSequence::Dispatch::groupsX, eve::gpgpu::WebGpuSequence::Dispatch::groupsY, eve::gpgpu::WebGpuSequence::Dispatch::groupsZ, eve::gpgpu::ComputeShader::kMaxBindings, eve::gpgpu::ComputeShader::kPushConstantBytes, eve::gpgpu::WebGpuSequence::Dispatch::push, sequence, eve::gpgpu::WebGpuSequence::Dispatch::shader , 以及 shader.
◆ webgpuSequenceRecordDownload()
| void eve::gpgpu::webgpuSequenceRecordDownload | ( | WebGpuSequence * | sequence, |
| GpuBuffer * | src, | ||
| GpuBuffer * | staging, | ||
| uint64_t | nbytes, | ||
| uint64_t | srcOffset | ||
| ) |
◆ webgpuSequenceRecordUpload()
| void eve::gpgpu::webgpuSequenceRecordUpload | ( | WebGpuSequence * | sequence, |
| GpuBuffer * | dst, | ||
| const void * | src, | ||
| uint64_t | nbytes, | ||
| uint64_t | dstOffset | ||
| ) |
Webgpu sequence record upload.
在文件 WebGpuGpgpu.cpp 第 397 行定义.
引用了 buffer, eve::gpgpu::WebGpuSequence::Upload::bytes, eve::gpgpu::WebGpuSequence::Upload::dst, eve::gpgpu::WebGpuSequence::Upload::offset , 以及 sequence.
◆ webgpuSequenceStatus()
| SequenceStatus eve::gpgpu::webgpuSequenceStatus | ( | const WebGpuSequence * | sequence | ) |
◆ webgpuSequenceSubmit()
| void eve::gpgpu::webgpuSequenceSubmit | ( | WebGpuSequence * | sequence | ) |
Webgpu sequence submit.
在文件 WebGpuGpgpu.cpp 第 567 行定义.
引用了 Complete, sequence, webgpuSequenceSubmitAsync() , 以及 webgpuSequenceWait().
◆ webgpuSequenceSubmitAsync()
| SequenceStatus eve::gpgpu::webgpuSequenceSubmitAsync | ( | WebGpuSequence * | sequence | ) |
Webgpu sequence submit async.
在文件 WebGpuGpgpu.cpp 第 440 行定义.
引用了 eve::gpgpu::WebGpuGpuBuffer::buffer, callback, Complete, desc, device, entries, Failed, eve::gpgpu::ComputeShader::kMaxBindings, eve::gpgpu::ComputeShader::kPushConstantBytes, Recording, sequence, eve::gpgpu::WebGpuGpuBuffer::size_, eve::gpgpu::WebGpuSequence::status, status, Submitted , 以及 webgpuSequenceReady().
被这些函数引用 webgpuSequenceSubmit().
◆ webgpuSequenceWait()
| SequenceStatus eve::gpgpu::webgpuSequenceWait | ( | WebGpuSequence * | sequence | ) |
Webgpu sequence wait.
在文件 WebGpuGpgpu.cpp 第 547 行定义.
引用了 Failed, sequence , 以及 Submitted.
被这些函数引用 webgpuSequenceDestroy() , 以及 webgpuSequenceSubmit().