diff --git a/src/reflection.rs b/src/reflection.rs index efe4e28..7222bac 100644 --- a/src/reflection.rs +++ b/src/reflection.rs @@ -29,6 +29,7 @@ pub fn create_entry(shaders: &CompiledShaders) -> Result { let vertex_layout = create_layouts(&shaders.vertex)?; let fragment_interfaces = create_interfaces(&shaders.fragment)?; let fragment_layout = create_layouts(&shaders.fragment)?; + let frag_input = FragInput { inputs: fragment_interfaces.inputs, }; @@ -110,8 +111,9 @@ fn create_interfaces(data: &[u32]) -> Result { } fn create_layouts(data: &[u32]) -> Result { - sr::ShaderModule::load_u32_data(data) - .map(|m| { + let mut ret = sr::ShaderModule::load_u32_data(data); + + ret.map(|m| { let descs: Result<_, Error> = m .enumerate_descriptor_sets(None) .map_err(|e| Error::LoadingData(e.to_string())) diff --git a/src/srvk.rs b/src/srvk.rs index e907abd..015ee80 100644 --- a/src/srvk.rs +++ b/src/srvk.rs @@ -32,7 +32,8 @@ impl TryFrom for SpirvTy { SpirvTy::try_from(d.image)?.inner(), )), SR::SampledImage => Ok(VK::Image(SpirvTy::try_from(d.image)?.inner())), - SR::StorageImage => Err(ConvertError::Unimplemented(format!("{:?}", d.descriptor_type))), + //SR::StorageImage => Err(ConvertError::Unimplemented(format!("{:?}", d.descriptor_type))), + SR::StorageImage => Ok(VK::Image(SpirvTy::try_from(d.image)?.inner())), SR::UniformTexelBuffer => Ok(VK::TexelBuffer { storage: false, format: None, @@ -66,7 +67,7 @@ impl TryFrom for SpirvTy { } }; let t = DescriptorImageDesc { - sampled: d.sampled != 0, + sampled: d.sampled == 1, dimensions: SpirvTy::try_from(d.dim)?.inner(), // TODO figure out how to do format correctly //format: Some(SpirvTy::from(d.image_format).inner()),