pub struct GpuContext {
Show 17 fields pub name: String, pub version: Option<String>, pub driver_version: Option<String>, pub id: Option<String>, pub vendor_id: Option<String>, pub vendor_name: Option<String>, pub memory_size: Option<u32>, pub api_type: Option<String>, pub multi_threaded_rendering: Option<bool>, pub npot_support: Option<bool>, pub max_texture_size: Option<u32>, pub graphics_shader_level: Option<String>, pub supports_draw_call_instancing: Option<bool>, pub supports_ray_tracing: Option<bool>, pub supports_compute_shaders: Option<bool>, pub supports_geometry_shaders: Option<bool>, pub other: BTreeMap<String, Value>,
}
Expand description

GPU context describes the GPU of the device.

Fields§

§name: String

The name of the graphics device.

§version: Option<String>

The Version of the graphics device.

§driver_version: Option<String>

The version of the graphic device driver.

§id: Option<String>

The PCI identifier of the graphics device.

§vendor_id: Option<String>

The PCI vendor identifier of the graphics device.

§vendor_name: Option<String>

The vendor name as reported by the graphics device.

§memory_size: Option<u32>

The total GPU memory available in Megabytes.

§api_type: Option<String>

The device low-level API type. Examples: “Apple Metal” or “Direct3D11”

§multi_threaded_rendering: Option<bool>

Whether the GPU has multi-threaded rendering or not.

§npot_support: Option<bool>

The Non-Power-Of-Two-Support support.

§max_texture_size: Option<u32>

Largest size of a texture that is supported by the graphics hardware.

§graphics_shader_level: Option<String>

Approximate “shader capability” level of the graphics device. For example, Shader Model 2.0, OpenGL ES 3.0, Metal / OpenGL ES 3.1, 27 (unknown).

§supports_draw_call_instancing: Option<bool>

Is GPU draw call instancing supported?

§supports_ray_tracing: Option<bool>

Is ray tracing available on the device?

§supports_compute_shaders: Option<bool>

Are compute shaders available on the device?

§supports_geometry_shaders: Option<bool>

Are geometry shaders available on the device?

§other: BTreeMap<String, Value>

Additional arbitrary fields for forwards compatibility.

Trait Implementations§

§

impl Clone for GpuContext

§

fn clone(&self) -> GpuContext

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for GpuContext

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for GpuContext

§

fn default() -> GpuContext

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for GpuContext

§

fn deserialize<__D>( __deserializer: __D ) -> Result<GpuContext, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<GpuContext> for Context

§

fn from(data: GpuContext) -> Context

Converts to this type from the input type.
§

impl PartialEq for GpuContext

§

fn eq(&self, other: &GpuContext) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for GpuContext

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for GpuContext

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,