Work around Adreno's OpName bug

This commit is contained in:
Dzmitry Malyshau
2021-09-08 17:29:51 -04:00
committed by Dzmitry Malyshau
parent 809909137c
commit 180dc27144
5 changed files with 12 additions and 5 deletions

View File

@@ -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"]

View File

@@ -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"]

View File

@@ -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 {

View File

@@ -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,

View File

@@ -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"]