From aea6d8b310dede44211fcf994f8ddb42df076d91 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 4 Jul 2026 16:49:31 -0700 Subject: load compiled SPIR-V bytecode (yay) no way to build it except by hand, as-yet. the tutorial doesn't cover that, we'll need to circle back and write a build.rs Force-Push: yes Change-Id: I2b489381f95b4b7505862caa236dea1c60cd9c1a --- src/error.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 39d52b8..f3f1ca9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -76,6 +76,20 @@ impl From for Error { } } +impl From for Error { + fn from(e: vulkanalia::bytecode::BytecodeError) -> Self { + Error { + message: match e { + vulkanalia::bytecode::BytecodeError::Alloc => + "Unable to allocate buffer for SPIR-V bytecode.".to_string(), + vulkanalia::bytecode::BytecodeError::Length(length) => + format!("Compiled SPIR-V bytecode has length {}, \ + which means it's corrupt.", length) + } + } + } +} + pub fn ignore_errors(mut body: impl FnMut() -> Result<()>) -> () { if let Err(e) = body() { eprintln!("Error: {}", e); -- cgit 1.4.1