We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parse_bytes
I'm trying to get a list of entry points of the shader like this:
use rspirv::{ binary::parse_bytes, dr::{self, Loader, Module, Operand}, grammar, spirv::{ExecutionModel, Op}, }; let mut loader = Loader::new(); parse_bytes(binary, &mut loader).expect("parsing SPIRV-V failed"); let module = loader.module(); let entry_points = module .entry_points .iter() .filter_map(|ep| { match_map!(ep, dr::Instruction { class: &grammar::Instruction { opname: "EntryPoint", opcode: Op::EntryPoint, .. }, operands, .. } if operands.iter().any(|o| matches!(o, Operand::ExecutionModel(ExecutionModel::Fragment))) => { let ep = operands.iter().find_map(|o| match_map!(o, Operand::LiteralString(s) => s))?; ep.as_str() }) }) .collect_vec();
But it fails with
thread 'main' panicked at 'parsing SPIRV-V failed: OperandExceeded(647492, 5251)'
When I use spirv-dis to get the entry points:
let spirv_dis = cmd!("spirv-dis", "-") .stdin_bytes(binary.clone()) .read() .context("can't determine SPIR-V entry points")?; let entry_points = regex!(r#"OpEntryPoint Fragment %\w+ "(\w+)""#) .captures_iter(&spirv_dis) .map(|cap| cap.get(1).map(|m| m.as_str()).expect("entry point")) .collect_vec();
it works and the shader runs (with opengl/glium).
(Although the shader doesn't render what it should, I'm not sure if it's related.)
minimal_vr.spv.zip
The text was updated successfully, but these errors were encountered:
This panics with your error on 0.7.0, but runs successfully on master. Please use master until a new version is released.
0.7.0
master
Sorry, something went wrong.
Just checked, the problem is an OpConstant for an 8 bit integer, which was fixed in #163
OpConstant
No branches or pull requests
I'm trying to get a list of entry points of the shader like this:
But it fails with
When I use spirv-dis to get the entry points:
it works and the shader runs (with opengl/glium).
(Although the shader doesn't render what it should, I'm not sure if it's related.)
minimal_vr.spv.zip
The text was updated successfully, but these errors were encountered: