Struct gfx_backend_gl::Device [−][src]
pub struct Device { /* fields omitted */ }
Expand description
GL device.
Trait Implementations
unsafe fn allocate_memory(
&self,
mem_type: MemoryTypeId,
size: u64
) -> Result<Memory, AllocationError>
unsafe fn allocate_memory(
&self,
mem_type: MemoryTypeId,
size: u64
) -> Result<Memory, AllocationError>
Allocates a memory segment of a specified type. Read more
unsafe fn create_command_pool(
&self,
_family: QueueFamilyId,
flags: CommandPoolCreateFlags
) -> Result<CommandPool, OutOfMemory>
unsafe fn create_command_pool(
&self,
_family: QueueFamilyId,
flags: CommandPoolCreateFlags
) -> Result<CommandPool, OutOfMemory>
Create a new command pool for a given queue family. Read more
Destroy a command pool.
unsafe fn create_render_pass<'a, Ia, Is, Id>(
&self,
attachments: Ia,
subpasses: Is,
_dependencies: Id
) -> Result<RenderPass, OutOfMemory> where
Ia: Iterator<Item = Attachment>,
Is: Iterator<Item = SubpassDesc<'a>>,
unsafe fn create_render_pass<'a, Ia, Is, Id>(
&self,
attachments: Ia,
subpasses: Is,
_dependencies: Id
) -> Result<RenderPass, OutOfMemory> where
Ia: Iterator<Item = Attachment>,
Is: Iterator<Item = SubpassDesc<'a>>,
Create a render pass with the given attachments and subpasses. Read more
unsafe fn create_pipeline_layout<'a, Is, Ic>(
&self,
layouts: Is,
_: Ic
) -> Result<PipelineLayout, OutOfMemory> where
Is: Iterator<Item = &'a Arc<Vec<DescriptorSetLayoutBinding>>>,
unsafe fn create_pipeline_layout<'a, Is, Ic>(
&self,
layouts: Is,
_: Ic
) -> Result<PipelineLayout, OutOfMemory> where
Is: Iterator<Item = &'a Arc<Vec<DescriptorSetLayoutBinding>>>,
Create a new pipeline layout object. Read more
Create a pipeline cache object.
Retrieve data from pipeline cache object.
Destroy a pipeline cache object.
unsafe fn merge_pipeline_caches<'a, I>(
&self,
_: &mut (),
_: I
) -> Result<(), OutOfMemory> where
I: Iterator<Item = &'a ()>,
unsafe fn merge_pipeline_caches<'a, I>(
&self,
_: &mut (),
_: I
) -> Result<(), OutOfMemory> where
I: Iterator<Item = &'a ()>,
Merge a number of source pipeline caches into the target one.
unsafe fn create_graphics_pipeline<'a>(
&self,
desc: &GraphicsPipelineDesc<'a, B>,
_cache: Option<&()>
) -> Result<GraphicsPipeline, CreationError>
unsafe fn create_graphics_pipeline<'a>(
&self,
desc: &GraphicsPipelineDesc<'a, B>,
_cache: Option<&()>
) -> Result<GraphicsPipeline, CreationError>
Create a graphics pipeline. Read more
unsafe fn create_compute_pipeline<'a>(
&self,
desc: &ComputePipelineDesc<'a, B>,
_cache: Option<&()>
) -> Result<ComputePipeline, CreationError>
unsafe fn create_compute_pipeline<'a>(
&self,
desc: &ComputePipelineDesc<'a, B>,
_cache: Option<&()>
) -> Result<ComputePipeline, CreationError>
Create a compute pipeline.
unsafe fn create_framebuffer<I>(
&self,
_render_pass: &RenderPass,
_attachments: I,
_extent: Extent
) -> Result<Framebuffer, OutOfMemory>
unsafe fn create_framebuffer<I>(
&self,
_render_pass: &RenderPass,
_attachments: I,
_extent: Extent
) -> Result<Framebuffer, OutOfMemory>
Create a new framebuffer object. Read more
Create a new shader module object from the SPIR-V binary data. Read more
unsafe fn create_shader_module_from_naga(
&self,
shader: NagaShader
) -> Result<ShaderModule, (ShaderError, NagaShader)>
unsafe fn create_shader_module_from_naga(
&self,
shader: NagaShader
) -> Result<ShaderModule, (ShaderError, NagaShader)>
Create a new shader module from the naga
module.
Create a new sampler object
unsafe fn create_buffer(
&self,
size: u64,
usage: Usage,
_sparse: SparseFlags
) -> Result<Buffer, CreationError>
unsafe fn create_buffer(
&self,
size: u64,
usage: Usage,
_sparse: SparseFlags
) -> Result<Buffer, CreationError>
Create a new buffer (unbound). Read more
Get memory requirements for the buffer
Bind memory to a buffer. Read more
Map a memory object into application address space Read more
Unmap a memory object once host access to it is no longer needed by the application
unsafe fn flush_mapped_memory_ranges<'a, I>(
&self,
ranges: I
) -> Result<(), OutOfMemory> where
I: Iterator<Item = (&'a Memory, Segment)>,
unsafe fn flush_mapped_memory_ranges<'a, I>(
&self,
ranges: I
) -> Result<(), OutOfMemory> where
I: Iterator<Item = (&'a Memory, Segment)>,
Flush mapped memory ranges
unsafe fn invalidate_mapped_memory_ranges<'a, I>(
&self,
ranges: I
) -> Result<(), OutOfMemory> where
I: Iterator<Item = (&'a Memory, Segment)>,
unsafe fn invalidate_mapped_memory_ranges<'a, I>(
&self,
ranges: I
) -> Result<(), OutOfMemory> where
I: Iterator<Item = (&'a Memory, Segment)>,
Invalidate ranges of non-coherent memory from the host caches
unsafe fn create_buffer_view(
&self,
_: &Buffer,
_: Option<Format>,
_: SubRange
) -> Result<BufferView, ViewCreationError>
unsafe fn create_buffer_view(
&self,
_: &Buffer,
_: Option<Format>,
_: SubRange
) -> Result<BufferView, ViewCreationError>
Create a new buffer view object
unsafe fn create_image(
&self,
kind: Kind,
num_levels: Level,
format: Format,
_tiling: Tiling,
usage: Usage,
_sparse: SparseFlags,
_view_caps: ViewCapabilities
) -> Result<Image, CreationError>
unsafe fn create_image(
&self,
kind: Kind,
num_levels: Level,
format: Format,
_tiling: Tiling,
usage: Usage,
_sparse: SparseFlags,
_view_caps: ViewCapabilities
) -> Result<Image, CreationError>
Create a new image object
Get memory requirements for the Image
unsafe fn get_image_subresource_footprint(
&self,
image: &Image,
sub: Subresource
) -> SubresourceFootprint
Bind device memory to an image object
unsafe fn create_image_view(
&self,
image: &Image,
kind: ViewKind,
view_format: Format,
swizzle: Swizzle,
_usage: Usage,
range: SubresourceRange
) -> Result<ImageView, ViewCreationError>
unsafe fn create_image_view(
&self,
image: &Image,
kind: ViewKind,
view_format: Format,
swizzle: Swizzle,
_usage: Usage,
range: SubresourceRange
) -> Result<ImageView, ViewCreationError>
Create an image view from an existing image
unsafe fn create_descriptor_pool<I>(
&self,
_: usize,
_: I,
_: DescriptorPoolCreateFlags
) -> Result<DescriptorPool, OutOfMemory> where
I: Iterator<Item = DescriptorRangeDesc>,
unsafe fn create_descriptor_pool<I>(
&self,
_: usize,
_: I,
_: DescriptorPoolCreateFlags
) -> Result<DescriptorPool, OutOfMemory> where
I: Iterator<Item = DescriptorRangeDesc>,
Create a descriptor pool. Read more
unsafe fn create_descriptor_set_layout<'a, I, J>(
&self,
layout: I,
_immutable_samplers: J
) -> Result<Arc<Vec<DescriptorSetLayoutBinding>>, OutOfMemory> where
I: Iterator<Item = DescriptorSetLayoutBinding>,
J: Iterator<Item = &'a FatSampler>,
unsafe fn create_descriptor_set_layout<'a, I, J>(
&self,
layout: I,
_immutable_samplers: J
) -> Result<Arc<Vec<DescriptorSetLayoutBinding>>, OutOfMemory> where
I: Iterator<Item = DescriptorSetLayoutBinding>,
J: Iterator<Item = &'a FatSampler>,
Create a descriptor set layout. Read more
unsafe fn write_descriptor_set<'a, I>(&self, op: DescriptorSetWrite<'a, B, I>) where
I: Iterator<Item = Descriptor<'a, B>>,
unsafe fn write_descriptor_set<'a, I>(&self, op: DescriptorSetWrite<'a, B, I>) where
I: Iterator<Item = Descriptor<'a, B>>,
Specifying the parameters of a descriptor set write operation.
Structure specifying a copy descriptor set operation.
Create a new semaphore object.
Create a new fence object. Read more
Resets a given fence to its original, unsignaled state.
Blocks until the given fence is signaled. Returns true if the fence was signaled before the timeout. Read more
true for signaled, false for not ready
Create an event object.
Query the status of an event. Read more
Resets an event.
Free device memory
Create a new query pool object Read more
Destroy a query pool object
Get query pool results into the specified CPU memory.
Returns Ok(false)
if the results are not ready yet and neither of WAIT
or PARTIAL
flags are set. Read more
Destroy a shader module module Read more
Destroys a render pass created by this device.
Destroy a pipeline layout object
Destroy a graphics pipeline. Read more
Destroy a compute pipeline. Read more
Destroy a framebuffer. Read more
Destroy a buffer. Read more
Destroy a buffer view object
Destroy an image. Read more
Destroy an image view object
Destroy a sampler object
Destroy a descriptor pool object Read more
Destroy a descriptor set layout object
Destroy a fence object
Destroy a semaphore object.
Destroy an event object.
Wait for all queues associated with this device to idle. Read more
Associate a name with an image, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a buffer, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a command buffer, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a semaphore, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a fence, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a framebuffer, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a render pass, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a descriptor set, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
unsafe fn set_descriptor_set_layout_name(
&self,
_descriptor_set_layout: &mut Arc<Vec<DescriptorSetLayoutBinding>>,
_name: &str
)
unsafe fn set_descriptor_set_layout_name(
&self,
_descriptor_set_layout: &mut Arc<Vec<DescriptorSetLayoutBinding>>,
_name: &str
)
Associate a name with a descriptor set layout, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
Associate a name with a pipeline layout, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages Read more
unsafe fn set_display_power_state(
&self,
_display: &Display<B>,
_power_state: &PowerState
) -> Result<(), DisplayControlError>
unsafe fn set_display_power_state(
&self,
_display: &Display<B>,
_power_state: &PowerState
) -> Result<(), DisplayControlError>
Control the power state of the provided display
unsafe fn register_device_event(
&self,
_device_event: &DeviceEvent,
_fence: &mut <B as Backend>::Fence
) -> Result<(), DisplayControlError>
unsafe fn register_device_event(
&self,
_device_event: &DeviceEvent,
_fence: &mut <B as Backend>::Fence
) -> Result<(), DisplayControlError>
Register device event
unsafe fn register_display_event(
&self,
_display: &Display<B>,
_display_event: &DisplayEvent,
_fence: &mut <B as Backend>::Fence
) -> Result<(), DisplayControlError>
unsafe fn register_display_event(
&self,
_display: &Display<B>,
_display_event: &DisplayEvent,
_fence: &mut <B as Backend>::Fence
) -> Result<(), DisplayControlError>
Register display event
unsafe fn create_allocate_external_buffer(
&self,
_external_memory_type: ExternalBufferMemoryType,
_usage: Usage,
_sparse: SparseFlags,
_type_mask: u32,
_size: u64
) -> Result<(Buffer, Memory), ExternalResourceError>
unsafe fn create_allocate_external_buffer(
&self,
_external_memory_type: ExternalBufferMemoryType,
_usage: Usage,
_sparse: SparseFlags,
_type_mask: u32,
_size: u64
) -> Result<(Buffer, Memory), ExternalResourceError>
Create, allocate and bind a buffer that can be exported. Read more
unsafe fn import_external_buffer(
&self,
_external_memory: ExternalBufferMemory,
_usage: Usage,
_sparse: SparseFlags,
_type_mask: u32,
_size: u64
) -> Result<(Buffer, Memory), ExternalResourceError>
unsafe fn import_external_buffer(
&self,
_external_memory: ExternalBufferMemory,
_usage: Usage,
_sparse: SparseFlags,
_type_mask: u32,
_size: u64
) -> Result<(Buffer, Memory), ExternalResourceError>
Import external memory as binded buffer and memory. Read more
unsafe fn create_allocate_external_image(
&self,
_external_memory_type: ExternalImageMemoryType,
_kind: Kind,
_num_levels: Level,
_format: Format,
_tiling: Tiling,
_usage: Usage,
_sparse: SparseFlags,
_view_caps: ViewCapabilities,
_type_mask: u32
) -> Result<(Image, Memory), ExternalResourceError>
unsafe fn create_allocate_external_image(
&self,
_external_memory_type: ExternalImageMemoryType,
_kind: Kind,
_num_levels: Level,
_format: Format,
_tiling: Tiling,
_usage: Usage,
_sparse: SparseFlags,
_view_caps: ViewCapabilities,
_type_mask: u32
) -> Result<(Image, Memory), ExternalResourceError>
Create, allocate and bind an image that can be exported. Read more
unsafe fn import_external_image(
&self,
_external_memory: ExternalImageMemory,
_kind: Kind,
_num_levels: Level,
_format: Format,
_tiling: Tiling,
_usage: Usage,
_sparse: SparseFlags,
_view_caps: ViewCapabilities,
_type_mask: u32
) -> Result<(Image, Memory), ExternalResourceError>
unsafe fn import_external_image(
&self,
_external_memory: ExternalImageMemory,
_kind: Kind,
_num_levels: Level,
_format: Format,
_tiling: Tiling,
_usage: Usage,
_sparse: SparseFlags,
_view_caps: ViewCapabilities,
_type_mask: u32
) -> Result<(Image, Memory), ExternalResourceError>
Import external memory as binded image and memory. Read more
unsafe fn export_memory(
&self,
_external_memory_type: ExternalMemoryType,
_memory: &Memory
) -> Result<PlatformMemory, ExternalMemoryExportError>
unsafe fn export_memory(
&self,
_external_memory_type: ExternalMemoryType,
_memory: &Memory
) -> Result<PlatformMemory, ExternalMemoryExportError>
Export memory as os type (Fd, Handle or Ptr) based on the requested external memory type. Read more
Retrieve the underlying drm format modifier from an image, if any. Read more
Starts frame capture.
Stops frame capture.
Auto Trait Implementations
impl !RefUnwindSafe for Device
impl !UnwindSafe for Device