Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
WebGPUDevice.hpp File Reference
module nullptr

WebGPU (Dawn / emdawnwebgpu) backend for GfxDevice (REARCH_WGSL Phase 2). More...

#include "../rhi/GfxDevice.hpp"
#include <webgpu/webgpu.h>
#include <array>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
Include dependency graph for WebGPUDevice.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  esengine::WebGPUDevice
struct  esengine::WebGPUDevice::NativeSurface

Namespaces

namespace  esengine

Detailed Description

WebGPU (Dawn / emdawnwebgpu) backend for GfxDevice (REARCH_WGSL Phase 2).

The live render path: a canvas surface (configureSurface) with a companion depth-stencil texture, per-pass command encoding (beginRenderPass applies the RenderPassDesc load-ops on color AND depth-stencil; endRenderPass submits), lazy WGPURenderPipeline builds from the retained PipelineDesc + layout + shader modules — one variant per pass depth-stencil shape, since WebGPU validates that coupling — EXPLICIT bind-group layouts built from each program's binding masks (group 0 = UBO slots, group 1 = texture/sampler pairs per the WebGPUMappings unit→binding convention, with dummy backfill for declared-but-unbound bindings — GL's tolerance for unused declarations, which the dual-language emitter's uniform injection relies on), indexed/instanced draw recording, and an internal clear-triangle family that emulates region-scoped clears and mid-pass stencil resets (the two clears WebGPU load-ops cannot spell). The class stays null-device safe: constructed without a WGPUDevice it degrades every entry point to a logged no-op, so handle bookkeeping and the language gate are testable without an adapter.

Compiled only under ES_ENABLE_WEBGPU; never part of the GL build.

Author
ESEngine Team
Date
2026

Definition in file WebGPUDevice.hpp.