diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ab949b03..1bd8fa7361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,16 @@ # Change Log -## TBD +## v0.6 (2021-08-18) + - development release for wgpu-0.10 - API: - atomic types and functions - - `num_workgroups` built-in - - WGSL `select()` order of true/false is swapped + - storage access is moved from global variables to the storage class and storage texture type + - new built-ins: `primitive_index` and `num_workgroups` + - support for multi-sampled depth images + - WGSL: + - `select()` order of true/false is swapped + - HLSL backend is vastly improved and now usable + - GLSL frontend is heavily reworked ## v0.5 (2021-06-18) - development release for wgpu-0.9 diff --git a/Cargo.toml b/Cargo.toml index 9ef3860d9f..f72aa0ae61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "naga" -version = "0.5.0" +version = "0.6.0" authors = ["Naga Developers"] edition = "2018" description = "Shader translation infrastructure" @@ -22,7 +22,7 @@ codespan-reporting = { version = "0.11.0", optional = true } fxhash = "0.2" log = "0.4" num-traits = "0.2" -spirv = { package = "spirv_headers", version = "1.5", optional = true } +spirv = { version = "0.2", optional = true } thiserror = "1.0.21" serde = { version = "1.0", features = ["derive"], optional = true } petgraph = { version ="0.5", optional = true } @@ -49,8 +49,8 @@ span = ["codespan-reporting"] diff = "0.1" ron = "0.6" serde = { version = "1.0", features = ["derive"] } -spirv = { package = "spirv_headers", version = "1.5", features = ["deserialize"] } -rspirv = "0.7" +spirv = { version = "0.2", features = ["deserialize"] } +rspirv = "0.10" env_logger = "0.8" [workspace] diff --git a/src/back/spv/writer.rs b/src/back/spv/writer.rs index d2f254b54d..90aee19ace 100644 --- a/src/back/spv/writer.rs +++ b/src/back/spv/writer.rs @@ -136,6 +136,9 @@ impl Writer { *self = fresh; } + //TODO: revive and rewrite this, see: + // https://github.com/gfx-rs/rspirv/issues/198 + // https://github.com/gfx-rs/rspirv/pull/185#issuecomment-900796025 pub(super) fn check(&mut self, capabilities: &[spirv::Capability]) -> Result<(), Error> { if capabilities.is_empty() || capabilities @@ -468,7 +471,7 @@ impl Writer { function_id: Word, mode: spirv::ExecutionMode, ) -> Result<(), Error> { - self.check(mode.required_capabilities())?; + //self.check(mode.required_capabilities())?; Instruction::execution_mode(function_id, mode, &[]) .to_words(&mut self.logical_layout.execution_modes); Ok(()) @@ -510,7 +513,7 @@ impl Writer { } crate::ShaderStage::Compute => { let execution_mode = spirv::ExecutionMode::LocalSize; - self.check(execution_mode.required_capabilities())?; + //self.check(execution_mode.required_capabilities())?; Instruction::execution_mode( function_id, execution_mode, @@ -520,7 +523,7 @@ impl Writer { spirv::ExecutionModel::GLCompute } }; - self.check(exec_model.required_capabilities())?; + //self.check(exec_model.required_capabilities())?; Ok(Instruction::entry_point( exec_model, @@ -719,7 +722,7 @@ impl Writer { pointer_class: None, }; let dim = map_dim(dim); - self.check(dim.required_capabilities())?; + //self.check(dim.required_capabilities())?; let type_id = self.get_type_id(LookupType::Local(local_type)); Instruction::type_image(id, type_id, dim, arrayed, class) } @@ -1061,7 +1064,7 @@ impl Writer { let id = self.id_gen.next(); let class = map_storage_class(global_variable.class); - self.check(class.required_capabilities())?; + //self.check(class.required_capabilities())?; let init_word = global_variable .init @@ -1230,8 +1233,8 @@ impl Writer { let addressing_model = spirv::AddressingModel::Logical; let memory_model = spirv::MemoryModel::GLSL450; - self.check(addressing_model.required_capabilities())?; - self.check(memory_model.required_capabilities())?; + //self.check(addressing_model.required_capabilities())?; + //self.check(memory_model.required_capabilities())?; Instruction::memory_model(addressing_model, memory_model) .to_words(&mut self.logical_layout.memory_model);