Skip to main content

Crate mabda

Crate mabda 

Source
Expand description

Mabda — GPU foundation layer for AGNOS

Mabda (Arabic: مبدأ — origin, principle, starting point) provides the shared GPU foundation that all AGNOS GPU consumers build upon. It owns the wgpu dependency and exposes device lifecycle, buffer management, compute dispatch, texture handling, profiling, and capability detection.

§Features

  • graphics — render targets, texture loading, surface helpers
  • compute — compute pipeline, storage buffers, dispatch utilities
  • full — enables both graphics and compute

§Consumers

  • soorat — rendering engine (sprites, PBR, shadows, post-fx)
  • rasa — image editor (GPU compute filters)
  • ranga — image processing library (GPU pixel ops)
  • bijli — electromagnetic simulation (FDTD compute)
  • aethersafta — desktop compositor (GPU compositing)
  • kiran — game engine (via soorat)

§Modules

Re-exports§

pub use capabilities::GpuCapabilities;
pub use color::Color;
pub use context::GpuContext;
pub use context::GpuContextBuilder;
pub use debug::DebugScope;
pub use error::GpuError;
pub use error::Result;
pub use resource::FrameResources;
pub use bind_group_cache::BindGroupCache;
pub use buffer::GrowableBuffer;
pub use buffer::PendingReadback;
pub use buffer::create_dispatch_indirect_buffer;
pub use buffer::create_staging_buffer;
pub use buffer::create_storage_buffer;
pub use buffer::create_storage_buffer_empty;
pub use buffer::create_uniform_buffer;
pub use buffer::read_buffer;
pub use buffer::read_buffer_async;
pub use buffer::read_buffer_typed;
pub use pipeline_cache::PipelineCache;
pub use shader::ShaderCache;
pub use compute::ComputePipeline;
pub use compute::PingPongBuffer;
pub use compute::validate_dispatch;
pub use compute::workgroups_1d;
pub use compute::workgroups_2d;
pub use bind_group::BindGroupLayoutBuilder;
pub use blend::BlendPreset;
pub use blend::blend_state;
pub use buffer::create_draw_indexed_indirect_buffer;
pub use buffer::create_draw_indirect_buffer;
pub use buffer::create_index_buffer;
pub use buffer::create_vertex_buffer;
pub use depth::DepthTexture;
pub use instancing::InstanceBuffer;
pub use instancing::InstanceData;
pub use render_pass::RenderPassBuilder;
pub use render_pipeline::DrawCommand;
pub use render_pipeline::RenderPipeline;
pub use render_pipeline::RenderPipelineBuilder;
pub use render_target::RenderTarget;
pub use render_target::RenderTargetBuilder;
pub use sampler::SamplerPreset;
pub use sampler::create_sampler;
pub use sampler::create_sampler_custom;
pub use surface::PresentModePreference;
pub use surface::SurfaceState;
pub use texture::CubemapTexture;
pub use texture::Texture;
pub use texture::TextureCache;
pub use texture::copy_texture_to_texture;
pub use texture::create_default_sampler;
pub use texture::mip_level_count;
pub use texture::validate_dimensions;
pub use vertex::SkinnedVertex3D;
pub use vertex::Vertex2D;
pub use vertex::Vertex3D;
pub use vertex::VertexLayout;
pub use typed_buffer::StorageBuffer;
pub use typed_buffer::UniformBuffer;
pub use profiler::FrameProfiler;
pub use profiler::GpuTimestamps;
pub use profiler::PassTiming;
pub use profiler::ProfileScope;

Modules§

bind_group
Bind group layout builder with preset entry helpers.
bind_group_cache
Bind group caching — deduplicates bind group creation by caller-provided key.
blend
Blend state presets for common rendering modes.
buffer
GPU buffer creation and readback utilities.
capabilities
GPU capability reporting — feature detection and limit queries.
color
Color types and utilities.
compute
Compute shader pipeline — general-purpose GPU compute.
context
GPU device and surface management.
debug
Debug labels and marker groups for GPU command encoders.
depth
Depth and stencil texture management.
error
Error types for mabda GPU operations.
instancing
Instanced rendering — per-instance transform and color data.
pipeline_cache
Pipeline caching — deduplicates GPU pipeline creation by descriptor hash.
profiler
Frame profiling — CPU timing and GPU timestamp queries.
render_pass
Render pass builder for fluent attachment configuration.
render_pipeline
Render pipeline abstraction.
render_target
Offscreen render targets (framebuffers).
resource
GPU resource lifecycle helpers.
sampler
Sampler presets and creation helpers.
shader
Shader module caching.
surface
Surface lifecycle management.
texture
Texture loading and management.
typed_buffer
Typed GPU buffer wrappers with alignment enforcement.
vertex
Vertex types and buffer layout descriptors.