Skip to content

Commit

Permalink
Release v0.6 version, changelog, and spirv update
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Aug 18, 2021
1 parent 4e181d6 commit 7a45d73
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "naga"
version = "0.5.0"
version = "0.6.0"
authors = ["Naga Developers"]
edition = "2018"
description = "Shader translation infrastructure"
Expand All @@ -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 }
Expand All @@ -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]
Expand Down
17 changes: 10 additions & 7 deletions src/back/spv/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(())
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7a45d73

Please sign in to comment.