Deterministic recording backend (design 0053 "Proposed Architecture", "Testing Strategy").
More...
|
|
| RecordingDevice ()=default |
| | Constructs an empty recording device.
|
|
| ~RecordingDevice () override=default |
| | Destructor.
|
| std::string | serialize () const |
| | Returns the deterministic line-based text capture of every recorded operation, in order.
|
| uint64_t | completedSerial () const override |
| | Serial of the most recent submission; recording completes instantly.
|
|
virtual | ~Device () |
| | Destructor; frees all remaining resources.
|
|
| Device (const Device &)=delete |
|
Device & | operator= (const Device &)=delete |
|
| Device (Device &&)=delete |
|
Device & | operator= (Device &&)=delete |
|
uint64_t | deviceId () const |
| | Process-unique identity of this device (starts at 1, never reused). Baked into every handle for cross-device validation.
|
| Result< Buffer > | createBuffer (const BufferDescriptor &descriptor) |
| | Creates a buffer.
|
| Result< Texture > | createTexture (const TextureDescriptor &descriptor) |
| | Creates a 2D texture.
|
| Result< TextureView > | createTextureView (const Texture &texture, const TextureViewDescriptor &descriptor) |
| | Creates a view of texture covering the whole texture.
|
| Result< Sampler > | createSampler (const SamplerDescriptor &descriptor) |
| | Creates a sampler.
|
| Result< BindGroupLayout > | createBindGroupLayout (const BindGroupLayoutDescriptor &descriptor) |
| | Creates a bind group layout.
|
| Result< BindGroup > | createBindGroup (const BindGroupDescriptor &descriptor) |
| | Creates a bind group.
|
| Result< PipelineLayout > | createPipelineLayout (const PipelineLayoutDescriptor &descriptor) |
| | Creates a pipeline layout.
|
| Result< ShaderModule > | createShaderModule (const ShaderModuleDescriptor &descriptor) |
| | Creates a shader module from trusted generated source.
|
| Result< RenderPipeline > | createRenderPipeline (const RenderPipelineDescriptor &descriptor) |
| | Creates a render pipeline.
|
| Status | destroyBuffer (const Buffer &buffer) |
| | Destroys a buffer; the handle and all references to it become stale.
|
| Status | destroyTexture (const Texture &texture) |
| | Destroys a texture; the handle and all references to it become stale.
|
| Status | destroyTextureView (const TextureView &textureView) |
| | Destroys a texture view; the handle and all references to it become stale.
|
| Status | destroySampler (const Sampler &sampler) |
| | Destroys a sampler; the handle and all references to it become stale.
|
| Status | destroyBindGroupLayout (const BindGroupLayout &bindGroupLayout) |
| | Destroys a bind group layout; the handle and all references to it become stale.
|
| Status | destroyBindGroup (const BindGroup &bindGroup) |
| | Destroys a bind group; the handle and all references to it become stale.
|
| Status | destroyPipelineLayout (const PipelineLayout &pipelineLayout) |
| | Destroys a pipeline layout; the handle and all references to it become stale.
|
| Status | destroyShaderModule (const ShaderModule &shaderModule) |
| | Destroys a shader module; the handle and all references to it become stale.
|
| Status | destroyRenderPipeline (const RenderPipeline &renderPipeline) |
| | Destroys a render pipeline; the handle and all references to it become stale.
|
|
Result< std::unique_ptr< CommandEncoder > > | createCommandEncoder () |
| | Creates a command encoder recording against this device. The encoder must not outlive the device.
|
| Status | writeBuffer (const Buffer &buffer, uint64_t offsetBytes, std::span< const uint8_t > data) |
| | Writes data into buffer at offsetBytes.
|
| Status | writeTexture (const Texture &texture, std::span< const uint8_t > data, const TexelCopyBufferLayout &dataLayout, const Extent2d &writeSize) |
| | Writes texel rows from data into texture starting at texel (0, 0).
|
| Result< uint64_t > | submit (CommandBuffer commandBuffer) |
| | Submits a finished command buffer, consuming it, and returns the assigned submission serial.
|
|
uint64_t | lastSubmittedSerial () const |
| | Serial assigned to the most recent submission (0 if none yet).
|
|
| Status | onCreateBuffer (uint32_t slotIndex, const BufferDescriptor &descriptor) override |
| | Backend hook: a buffer passed validation and occupies slotIndex.
|
| Status | onCreateTexture (uint32_t slotIndex, const TextureDescriptor &descriptor) override |
| | Backend hook: a texture passed validation and occupies slotIndex.
|
| Status | onCreateTextureView (uint32_t slotIndex, uint32_t textureSlotIndex, const TextureViewDescriptor &descriptor) override |
| | Backend hook: a texture view passed validation and occupies slotIndex.
|
| Status | onCreateSampler (uint32_t slotIndex, const SamplerDescriptor &descriptor) override |
| | Backend hook: a sampler passed validation and occupies slotIndex.
|
| Status | onCreateBindGroupLayout (uint32_t slotIndex, const BindGroupLayoutDescriptor &descriptor) override |
| | Backend hook: a bind group layout passed validation and occupies slotIndex.
|
| Status | onCreateBindGroup (uint32_t slotIndex, const BindGroupDescriptor &descriptor) override |
| | Backend hook: a bind group passed validation and occupies slotIndex.
|
| Status | onCreatePipelineLayout (uint32_t slotIndex, const PipelineLayoutDescriptor &descriptor) override |
| | Backend hook: a pipeline layout passed validation and occupies slotIndex.
|
| Status | onCreateShaderModule (uint32_t slotIndex, const ShaderModuleDescriptor &descriptor) override |
| | Backend hook: a shader module passed validation and occupies slotIndex.
|
| Status | onCreateRenderPipeline (uint32_t slotIndex, const RenderPipelineDescriptor &descriptor) override |
| | Backend hook: a render pipeline passed validation and occupies slotIndex.
|
| void | onDestroyResource (std::string_view resourceName, uint32_t slotIndex) override |
| | Backend hook: a validated resource was destroyed.
|
| Status | onWriteBuffer (uint32_t slotIndex, uint64_t offsetBytes, std::span< const uint8_t > data) override |
| | Backend hook: a validated buffer write.
|
| Status | onWriteTexture (uint32_t slotIndex, std::span< const uint8_t > data, const TexelCopyBufferLayout &dataLayout, const Extent2d &writeSize) override |
| | Backend hook: a validated texture write.
|
| Status | onSubmit (uint64_t submissionSerial, uint32_t commandBufferSlotIndex, std::span< const Command > commands) override |
| | Backend hook: a validated command buffer was submitted.
|
|
| Device () |
| | Constructor for backends; assigns the process-unique device identity.
|
| Status | validateBufferHandleForBackend (const Buffer &buffer) const |
| | Validates a buffer handle for backend-provided auxiliary entry points (test readback helpers and similar), running the same null/device-identity/generation checks the template-method public API performs before its hooks.
|
Deterministic recording backend (design 0053 "Proposed Architecture", "Testing Strategy").
Inherits every fail-closed validation check from Device and records each validated operation as a line of text. serialize returns the capture: repeated identical operation streams serialize byte-identically, resources are identified by stable slot-based ids like buffer#0 (never pointers or process state), descriptor fields are dumped in full with fixed formatting, and data payloads appear as byte counts plus a content hash.
Submission completes instantly: completedSerial always equals Device::lastSubmittedSerial.