Skip to content

Commit

Permalink
Work around Adreno's OpName bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Sep 8, 2021
1 parent 8099091 commit 448babc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ thiserror = "1"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "d4bedaf"
rev = "e226cf3"
#version = "0.6"
features = ["wgsl-in"]

Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ core-graphics-types = "0.1"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "d4bedaf"
rev = "e226cf3"
#version = "0.6"

[dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "d4bedaf"
rev = "e226cf3"
#version = "0.6"
features = ["wgsl-in"]

Expand Down
3 changes: 3 additions & 0 deletions wgpu-hal/src/auxil/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ pub mod db {
pub mod nvidia {
pub const VENDOR: u32 = 0x10DE;
}
pub mod qualcomm {
pub const VENDOR: u32 = 0x5143;
}
}

pub fn map_naga_stage(stage: naga::ShaderStage) -> wgt::ShaderStages {
Expand Down
4 changes: 4 additions & 0 deletions wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,10 @@ impl super::Adapter {
spv::WriterFlags::DEBUG,
self.instance.flags.contains(crate::InstanceFlags::DEBUG),
);
flags.set(
spv::WriterFlags::LABEL_VARYINGS,
self.phd_capabilities.properties.vendor_id != crate::auxil::db::qualcomm::VENDOR,
);
spv::Options {
lang_version: (1, 0),
flags,
Expand Down
4 changes: 2 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ env_logger = "0.8"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "d4bedaf"
rev = "e226cf3"
#version = "0.6"
optional = true

# used to test all the example shaders
[dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "d4bedaf"
rev = "e226cf3"
#version = "0.6"
features = ["wgsl-in"]

Expand Down

0 comments on commit 448babc

Please sign in to comment.