minor fixes

This commit is contained in:
2025-12-20 22:18:14 +00:00
parent b6b0c2114f
commit b147b07e33
5 changed files with 18 additions and 14 deletions
+1
View File
@@ -7,3 +7,4 @@ pub mod types;
pub mod vm;
const BYTECODE_IMITATES_GLSL: bool = false;
const DUMP_SPV_DIS_TO_FILE: bool = false;
+11 -8
View File
@@ -3,6 +3,7 @@ use core::f32;
use rspirv::{binary::Disassemble, dr::Module, spirv};
use crate::{
DUMP_SPV_DIS_TO_FILE,
instruction_set::InstructionSet,
spirv_compilers::{
SpirVTypes,
@@ -521,15 +522,17 @@ impl SSATape {
let module = b.module();
std::fs::write(
format!(
"{}.spv-dis",
humantime::format_rfc3339(std::time::SystemTime::now())
if DUMP_SPV_DIS_TO_FILE {
std::fs::write(
format!(
"{}.spv-dis",
humantime::format_rfc3339(std::time::SystemTime::now())
)
.to_string(),
module.disassemble(),
)
.to_string(),
module.disassemble(),
)
.unwrap();
.unwrap();
}
module
}