Struct wgpu_core::hub::Global [−][src]
pub struct Global<G: GlobalIdentityHandlerFactory> { pub instance: Instance, pub surfaces: Registry<Surface, SurfaceId, G>, // some fields omitted }
Fields
instance: Instancesurfaces: Registry<Surface, SurfaceId, G>Implementations
pub fn command_encoder_clear_buffer<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
dst: BufferId,
offset: BufferAddress,
size: Option<BufferSize>
) -> Result<(), ClearError>pub fn command_encoder_clear_image<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
dst: TextureId,
subresource_range: &ImageSubresourceRange
) -> Result<(), ClearError>pub fn command_encoder_run_compute_pass<B: GfxBackend>(
&self,
encoder_id: CommandEncoderId,
pass: &ComputePass
) -> Result<(), ComputePassError>pub fn command_encoder_write_timestamp<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
query_set_id: QuerySetId,
query_index: u32
) -> Result<(), QueryError>pub fn command_encoder_resolve_query_set<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
query_set_id: QuerySetId,
start_query: u32,
query_count: u32,
destination: BufferId,
destination_offset: BufferAddress
) -> Result<(), QueryError>pub fn command_encoder_run_render_pass<B: GfxBackend>(
&self,
encoder_id: CommandEncoderId,
pass: &RenderPass
) -> Result<(), RenderPassError>pub fn command_encoder_copy_buffer_to_buffer<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
source: BufferId,
source_offset: BufferAddress,
destination: BufferId,
destination_offset: BufferAddress,
size: BufferAddress
) -> Result<(), CopyError>pub fn command_encoder_copy_buffer_to_texture<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
source: &ImageCopyBuffer,
destination: &ImageCopyTexture,
copy_size: &Extent3d
) -> Result<(), CopyError>pub fn command_encoder_copy_texture_to_buffer<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
source: &ImageCopyTexture,
destination: &ImageCopyBuffer,
copy_size: &Extent3d
) -> Result<(), CopyError>pub fn command_encoder_copy_texture_to_texture<B: GfxBackend>(
&self,
command_encoder_id: CommandEncoderId,
source: &ImageCopyTexture,
destination: &ImageCopyTexture,
copy_size: &Extent3d
) -> Result<(), CopyError>pub fn command_encoder_finish<B: GfxBackend>(
&self,
encoder_id: CommandEncoderId,
_desc: &CommandBufferDescriptor<Label<'_>>
) -> (CommandBufferId, Option<CommandEncoderError>)pub fn command_encoder_push_debug_group<B: GfxBackend>(
&self,
encoder_id: CommandEncoderId,
label: &str
) -> Result<(), CommandEncoderError>pub fn command_encoder_insert_debug_marker<B: GfxBackend>(
&self,
encoder_id: CommandEncoderId,
label: &str
) -> Result<(), CommandEncoderError>pub fn command_encoder_pop_debug_group<B: GfxBackend>(
&self,
encoder_id: CommandEncoderId
) -> Result<(), CommandEncoderError>pub fn queue_write_buffer<B: GfxBackend>(
&self,
queue_id: QueueId,
buffer_id: BufferId,
buffer_offset: BufferAddress,
data: &[u8]
) -> Result<(), QueueWriteError>pub fn queue_write_texture<B: GfxBackend>(
&self,
queue_id: QueueId,
destination: &ImageCopyTexture,
data: &[u8],
data_layout: &ImageDataLayout,
size: &Extent3d
) -> Result<(), QueueWriteError>pub fn queue_submit<B: GfxBackend>(
&self,
queue_id: QueueId,
command_buffer_ids: &[CommandBufferId]
) -> Result<(), QueueSubmitError>pub fn queue_get_timestamp_period<B: GfxBackend>(
&self,
queue_id: QueueId
) -> Result<f32, InvalidQueue>pub fn adapter_get_swap_chain_preferred_format<B: GfxBackend>(
&self,
adapter_id: AdapterId,
surface_id: SurfaceId
) -> Result<TextureFormat, GetSwapChainPreferredFormatError>pub fn device_features<B: GfxBackend>(
&self,
device_id: DeviceId
) -> Result<Features, InvalidDevice>pub fn device_limits<B: GfxBackend>(
&self,
device_id: DeviceId
) -> Result<Limits, InvalidDevice>pub fn device_downlevel_properties<B: GfxBackend>(
&self,
device_id: DeviceId
) -> Result<DownlevelProperties, InvalidDevice>pub fn device_create_buffer<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &BufferDescriptor<'_>,
id_in: Input<G, BufferId>
) -> (BufferId, Option<CreateBufferError>)pub fn device_set_buffer_sub_data<B: GfxBackend>(
&self,
device_id: DeviceId,
buffer_id: BufferId,
offset: BufferAddress,
data: &[u8]
) -> Result<(), BufferAccessError>pub fn device_get_buffer_sub_data<B: GfxBackend>(
&self,
device_id: DeviceId,
buffer_id: BufferId,
offset: BufferAddress,
data: &mut [u8]
) -> Result<(), BufferAccessError>pub fn device_create_texture<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &TextureDescriptor<'_>,
id_in: Input<G, TextureId>
) -> (TextureId, Option<CreateTextureError>)pub fn texture_destroy<B: GfxBackend>(
&self,
texture_id: TextureId
) -> Result<(), DestroyError>pub fn texture_create_view<B: GfxBackend>(
&self,
texture_id: TextureId,
desc: &TextureViewDescriptor<'_>,
id_in: Input<G, TextureViewId>
) -> (TextureViewId, Option<CreateTextureViewError>)pub fn texture_view_drop<B: GfxBackend>(
&self,
texture_view_id: TextureViewId,
wait: bool
) -> Result<(), TextureViewDestroyError>pub fn device_create_sampler<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &SamplerDescriptor<'_>,
id_in: Input<G, SamplerId>
) -> (SamplerId, Option<CreateSamplerError>)pub fn device_create_bind_group_layout<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &BindGroupLayoutDescriptor<'_>,
id_in: Input<G, BindGroupLayoutId>
) -> (BindGroupLayoutId, Option<CreateBindGroupLayoutError>)pub fn device_create_pipeline_layout<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &PipelineLayoutDescriptor<'_>,
id_in: Input<G, PipelineLayoutId>
) -> (PipelineLayoutId, Option<CreatePipelineLayoutError>)pub fn device_create_bind_group<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &BindGroupDescriptor<'_>,
id_in: Input<G, BindGroupId>
) -> (BindGroupId, Option<CreateBindGroupError>)pub fn device_create_shader_module<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &ShaderModuleDescriptor<'_>,
source: ShaderModuleSource<'_>,
id_in: Input<G, ShaderModuleId>
) -> (ShaderModuleId, Option<CreateShaderModuleError>)pub fn device_create_command_encoder<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &CommandEncoderDescriptor<Label<'_>>,
id_in: Input<G, CommandEncoderId>
) -> (CommandEncoderId, Option<CommandAllocatorError>)pub fn device_create_render_bundle_encoder(
&self,
device_id: DeviceId,
desc: &RenderBundleEncoderDescriptor<'_>
) -> (RenderBundleEncoderId, Option<CreateRenderBundleError>)pub fn render_bundle_encoder_finish<B: GfxBackend>(
&self,
bundle_encoder: RenderBundleEncoder,
desc: &RenderBundleDescriptor<'_>,
id_in: Input<G, RenderBundleId>
) -> (RenderBundleId, Option<RenderBundleError>)pub fn device_create_query_set<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &QuerySetDescriptor,
id_in: Input<G, QuerySetId>
) -> (QuerySetId, Option<CreateQuerySetError>)pub fn device_create_render_pipeline<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &RenderPipelineDescriptor<'_>,
id_in: Input<G, RenderPipelineId>,
implicit_pipeline_ids: Option<ImplicitPipelineIds<'_, G>>
) -> (RenderPipelineId, Option<CreateRenderPipelineError>)pub fn render_pipeline_get_bind_group_layout<B: GfxBackend>(
&self,
pipeline_id: RenderPipelineId,
index: u32,
id_in: Input<G, BindGroupLayoutId>
) -> (BindGroupLayoutId, Option<GetBindGroupLayoutError>)
pub fn render_pipeline_get_bind_group_layout<B: GfxBackend>(
&self,
pipeline_id: RenderPipelineId,
index: u32,
id_in: Input<G, BindGroupLayoutId>
) -> (BindGroupLayoutId, Option<GetBindGroupLayoutError>)Get an ID of one of the bind group layouts. The ID adds a refcount,
which needs to be released by calling bind_group_layout_drop.
pub fn device_create_compute_pipeline<B: GfxBackend>(
&self,
device_id: DeviceId,
desc: &ComputePipelineDescriptor<'_>,
id_in: Input<G, ComputePipelineId>,
implicit_pipeline_ids: Option<ImplicitPipelineIds<'_, G>>
) -> (ComputePipelineId, Option<CreateComputePipelineError>)pub fn compute_pipeline_get_bind_group_layout<B: GfxBackend>(
&self,
pipeline_id: ComputePipelineId,
index: u32,
id_in: Input<G, BindGroupLayoutId>
) -> (BindGroupLayoutId, Option<GetBindGroupLayoutError>)
pub fn compute_pipeline_get_bind_group_layout<B: GfxBackend>(
&self,
pipeline_id: ComputePipelineId,
index: u32,
id_in: Input<G, BindGroupLayoutId>
) -> (BindGroupLayoutId, Option<GetBindGroupLayoutError>)Get an ID of one of the bind group layouts. The ID adds a refcount,
which needs to be released by calling bind_group_layout_drop.
pub fn device_create_swap_chain<B: GfxBackend>(
&self,
device_id: DeviceId,
surface_id: SurfaceId,
desc: &SwapChainDescriptor
) -> (SwapChainId, Option<CreateSwapChainError>)pub fn device_poll<B: GfxBackend>(
&self,
device_id: DeviceId,
force_wait: bool
) -> Result<(), WaitIdleError>pub fn buffer_map_async<B: GfxBackend>(
&self,
buffer_id: BufferId,
range: Range<BufferAddress>,
op: BufferMapOperation
) -> Result<(), BufferAccessError>pub fn buffer_get_mapped_range<B: GfxBackend>(
&self,
buffer_id: BufferId,
offset: BufferAddress,
size: Option<BufferAddress>
) -> Result<(*mut u8, u64), BufferAccessError>pub fn buffer_unmap<B: GfxBackend>(
&self,
buffer_id: BufferId
) -> Result<(), BufferAccessError>pub fn enumerate_adapters(
&self,
inputs: AdapterInputs<'_, Input<G, AdapterId>>
) -> Vec<AdapterId>pub fn request_adapter(
&self,
desc: &RequestAdapterOptions,
inputs: AdapterInputs<'_, Input<G, AdapterId>>
) -> Result<AdapterId, RequestAdapterError>pub fn adapter_get_info<B: GfxBackend>(
&self,
adapter_id: AdapterId
) -> Result<AdapterInfo, InvalidAdapter>pub fn adapter_get_texture_format_features<B: GfxBackend>(
&self,
adapter_id: AdapterId,
format: TextureFormat
) -> Result<TextureFormatFeatures, InvalidAdapter>pub fn adapter_features<B: GfxBackend>(
&self,
adapter_id: AdapterId
) -> Result<Features, InvalidAdapter>pub fn adapter_limits<B: GfxBackend>(
&self,
adapter_id: AdapterId
) -> Result<Limits, InvalidAdapter>pub fn adapter_downlevel_properties<B: GfxBackend>(
&self,
adapter_id: AdapterId
) -> Result<DownlevelProperties, InvalidAdapter>pub fn adapter_request_device<B: GfxBackend>(
&self,
adapter_id: AdapterId,
desc: &DeviceDescriptor<'_>,
trace_path: Option<&Path>,
id_in: Input<G, DeviceId>
) -> (DeviceId, Option<RequestDeviceError>)pub fn swap_chain_get_current_texture_view<B: GfxBackend>(
&self,
swap_chain_id: SwapChainId,
view_id_in: Input<G, TextureViewId>
) -> Result<SwapChainOutput, SwapChainError>pub fn swap_chain_present<B: GfxBackend>(
&self,
swap_chain_id: SwapChainId
) -> Result<SwapChainStatus, SwapChainError>Trait Implementations
Auto Trait Implementations
impl<G> !RefUnwindSafe for Global<G>impl<G> Send for Global<G> where
<G as IdentityHandlerFactory<Id<Adapter<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<BindGroup<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<BindGroupLayout<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<Buffer<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<CommandBuffer<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<ComputePipeline<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<Device<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<PipelineLayout<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<QuerySet<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<RenderBundle>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<RenderPipeline<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<Sampler<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<ShaderModule<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<Surface>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<SwapChain<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<Texture<Backend>>>>::Filter: Send,
<G as IdentityHandlerFactory<Id<TextureView<Backend>>>>::Filter: Send, impl<G> Sync for Global<G> where
<G as IdentityHandlerFactory<Id<Adapter<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<BindGroup<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<BindGroupLayout<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<Buffer<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<CommandBuffer<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<ComputePipeline<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<Device<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<PipelineLayout<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<QuerySet<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<RenderBundle>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<RenderPipeline<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<Sampler<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<ShaderModule<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<Surface>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<SwapChain<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<Texture<Backend>>>>::Filter: Sync,
<G as IdentityHandlerFactory<Id<TextureView<Backend>>>>::Filter: Sync, impl<G> Unpin for Global<G> where
<G as IdentityHandlerFactory<Id<Adapter<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<BindGroup<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<BindGroupLayout<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<Buffer<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<CommandBuffer<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<ComputePipeline<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<Device<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<PipelineLayout<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<QuerySet<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<RenderBundle>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<RenderPipeline<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<Sampler<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<ShaderModule<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<Surface>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<SwapChain<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<Texture<Backend>>>>::Filter: Unpin,
<G as IdentityHandlerFactory<Id<TextureView<Backend>>>>::Filter: Unpin, impl<G> !UnwindSafe for Global<G>