molgfx-gpu 0.1.0

The backend-agnostic GPU hardware abstraction: device, queue, encoder and surface traits.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::GpuError;

#[test]
fn runtime_diagnostics_have_a_distinct_code_and_preserve_backend_detail() {
    let error = GpuError::Runtime {
        detail: "buffer binding requires 48 bytes".to_owned(),
    };
    assert_eq!(error.code(), "MOLGFX-E0061");
    assert!(
        error
            .to_string()
            .contains("buffer binding requires 48 bytes")
    );
    assert_ne!(error.code(), GpuError::DeviceLost.code());
}