зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1879284 - Update `wgpu` to revision 07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a. r=webgpu-reviewers,supply-chain-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D201066
This commit is contained in:
Родитель
5695a8fe71
Коммит
cef8996c0f
|
@ -30,9 +30,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
|
|||
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/gfx-rs/wgpu?rev=32e70bc1635905c508d408eb1cf22b2aa062ffe1"]
|
||||
[source."git+https://github.com/gfx-rs/wgpu?rev=07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"]
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/glandium/mio?rev=9a2ef335c366044ffe73b1c4acabe50a1daefe05"]
|
||||
|
|
|
@ -1150,7 +1150,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "d3d12"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=32e70bc1635905c508d408eb1cf22b2aa062ffe1#32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a#07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
dependencies = [
|
||||
"bitflags 2.4.1",
|
||||
"libloading",
|
||||
|
@ -3848,7 +3848,7 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664"
|
|||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=32e70bc1635905c508d408eb1cf22b2aa062ffe1#32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a#07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set",
|
||||
|
@ -6469,7 +6469,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=32e70bc1635905c508d408eb1cf22b2aa062ffe1#32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a#07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-vec",
|
||||
|
@ -6495,7 +6495,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-hal"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=32e70bc1635905c508d408eb1cf22b2aa062ffe1#32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a#07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"arrayvec",
|
||||
|
@ -6534,7 +6534,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-types"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=32e70bc1635905c508d408eb1cf22b2aa062ffe1#32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a#07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
dependencies = [
|
||||
"bitflags 2.4.1",
|
||||
"js-sys",
|
||||
|
|
|
@ -17,7 +17,7 @@ default = []
|
|||
[dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
# TODO: remove the replay feature on the next update containing https://github.com/gfx-rs/wgpu/pull/5182
|
||||
features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"]
|
||||
|
||||
|
@ -26,37 +26,37 @@ features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"
|
|||
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
features = ["metal"]
|
||||
|
||||
# We want the wgpu-core Direct3D backends on Windows.
|
||||
[target.'cfg(windows)'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
features = ["dx12"]
|
||||
|
||||
# We want the wgpu-core Vulkan backend on Linux and Windows.
|
||||
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
features = ["vulkan"]
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
|
||||
[dependencies.wgh]
|
||||
package = "wgpu-hal"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
features = ["windows_rs"]
|
||||
|
||||
[target.'cfg(windows)'.dependencies.d3d12]
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
rev = "07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = "0.3"
|
||||
|
|
|
@ -20,11 +20,11 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: commit 32e70bc1635905c508d408eb1cf22b2aa062ffe1
|
||||
release: commit 07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a
|
||||
|
||||
# Revision to pull in
|
||||
# Must be a long or short commit SHA (long preferred)
|
||||
revision: 32e70bc1635905c508d408eb1cf22b2aa062ffe1
|
||||
revision: 07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a
|
||||
|
||||
license: ['MIT', 'Apache-2.0']
|
||||
|
||||
|
|
|
@ -1305,7 +1305,7 @@ who = [
|
|||
"Nicolas Silva <nical@fastmail.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.7.0 -> 0.19.0@git:32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
delta = "0.7.0 -> 0.19.0@git:07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
importable = false
|
||||
|
||||
[[audits.darling]]
|
||||
|
@ -2637,7 +2637,7 @@ who = [
|
|||
"Nicolas Silva <nical@fastmail.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.14.0 -> 0.19.0@git:32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
delta = "0.14.0 -> 0.19.0@git:07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
importable = false
|
||||
|
||||
[[audits.net2]]
|
||||
|
@ -4446,7 +4446,7 @@ who = [
|
|||
"Nicolas Silva <nical@fastmail.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.18.0 -> 0.19.0@git:32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
delta = "0.18.0 -> 0.19.0@git:07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
importable = false
|
||||
|
||||
[[audits.wgpu-hal]]
|
||||
|
@ -4500,7 +4500,7 @@ who = [
|
|||
"Nicolas Silva <nical@fastmail.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.18.0 -> 0.19.0@git:32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
delta = "0.18.0 -> 0.19.0@git:07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
importable = false
|
||||
|
||||
[[audits.wgpu-types]]
|
||||
|
@ -4554,7 +4554,7 @@ who = [
|
|||
"Nicolas Silva <nical@fastmail.com>",
|
||||
]
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.18.0 -> 0.19.0@git:32e70bc1635905c508d408eb1cf22b2aa062ffe1"
|
||||
delta = "0.18.0 -> 0.19.0@git:07e59eb6fc7de3f682f1c401b9cf9f0da9ee4b4a"
|
||||
importable = false
|
||||
|
||||
[[audits.whatsys]]
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"CHANGELOG.md":"45fa76b0e5bc51721887147000e9e78a5934cb04d1ad628e501ef2082763d353","Cargo.toml":"1108efc3deca25c270c3f8631abca07e7e696aace92d324ef8b83503cb2edbc3","README.md":"76cee3209f773a62535de6c9724b53f158406359f35b4d48b17ac3747b6c102e","src/com.rs":"cfc8f5692162b4cbf9bf370959ad0be08a40a7e9026b5511ca0065ffe33f72ab","src/command_allocator.rs":"ef01059a661749470f3772d188fe0fab0f002e1d154facdab4b9b2932f4b2d93","src/command_list.rs":"8723f3b755b721e0dbb234bd604956c1b7922a2368231197495daa3fa6548e63","src/debug.rs":"aa33b98f7c3e71cba75fc42c6ca9af72d96b45122422c16e48525e24590c57bf","src/descriptor.rs":"fea0b820de1566b54d17d8d0c67e6f5a2126eda19526397eb710ff7d6db9db9e","src/device.rs":"c1dd479aabd22bced0d407523d60629ad1da439fb47ad89fe7b48bae1c4b23e5","src/dxgi.rs":"1516186845b91bf3df813a29b4a0e00a85ca5649fb7a2755da43fba984c41a42","src/heap.rs":"dae2380684896c97e97ed022929f79ce2cc4f5418a3ec34883086f7c88f423d0","src/lib.rs":"612e2f471b84502d219da3fb86ee13f3cbd6faf17d77407bab6c84e51ec424d0","src/pso.rs":"ff819c321536695e34a3be9a6051cf3e57765049a4a2035db6ab27add5a7978a","src/query.rs":"ff61a2b76a108afc1f082724bb9b07ac8b52afbe97356e0fcf6df0ff7e53e07d","src/queue.rs":"bd32813d0b8a3bedf3223b69ade9f9c799a138a9e27d970f86435d9ce32d1557","src/resource.rs":"8989cdb7c3ee0687c826047f39f85148459d9219754f20a970bf8aaa09b96e27","src/sync.rs":"5c287fb7498242a397eb1f08887be9cff9b48dc7cb13af5792cce5f7182b55f8"},"package":null}
|
||||
{"files":{"CHANGELOG.md":"45fa76b0e5bc51721887147000e9e78a5934cb04d1ad628e501ef2082763d353","Cargo.toml":"1108efc3deca25c270c3f8631abca07e7e696aace92d324ef8b83503cb2edbc3","README.md":"76cee3209f773a62535de6c9724b53f158406359f35b4d48b17ac3747b6c102e","src/com.rs":"cfd6556a7abf38cba57559038f9f2cf86274418448fb2745436c251a99575e05","src/command_allocator.rs":"ef01059a661749470f3772d188fe0fab0f002e1d154facdab4b9b2932f4b2d93","src/command_list.rs":"8723f3b755b721e0dbb234bd604956c1b7922a2368231197495daa3fa6548e63","src/debug.rs":"aa33b98f7c3e71cba75fc42c6ca9af72d96b45122422c16e48525e24590c57bf","src/descriptor.rs":"fea0b820de1566b54d17d8d0c67e6f5a2126eda19526397eb710ff7d6db9db9e","src/device.rs":"c1dd479aabd22bced0d407523d60629ad1da439fb47ad89fe7b48bae1c4b23e5","src/dxgi.rs":"1516186845b91bf3df813a29b4a0e00a85ca5649fb7a2755da43fba984c41a42","src/heap.rs":"dae2380684896c97e97ed022929f79ce2cc4f5418a3ec34883086f7c88f423d0","src/lib.rs":"612e2f471b84502d219da3fb86ee13f3cbd6faf17d77407bab6c84e51ec424d0","src/pso.rs":"ff819c321536695e34a3be9a6051cf3e57765049a4a2035db6ab27add5a7978a","src/query.rs":"ff61a2b76a108afc1f082724bb9b07ac8b52afbe97356e0fcf6df0ff7e53e07d","src/queue.rs":"bd32813d0b8a3bedf3223b69ade9f9c799a138a9e27d970f86435d9ce32d1557","src/resource.rs":"8989cdb7c3ee0687c826047f39f85148459d9219754f20a970bf8aaa09b96e27","src/sync.rs":"5c287fb7498242a397eb1f08887be9cff9b48dc7cb13af5792cce5f7182b55f8"},"package":null}
|
|
@ -121,7 +121,7 @@ impl<T: Interface> Hash for ComPtr<T> {
|
|||
/// Three function names need to be attached to each variant. The examples are given for the MyComObject1 variant below:
|
||||
/// - the from function (`ComPtr<actual::ComObject1> -> Self`)
|
||||
/// - the as function (`&self -> Option<ComPtr<actual::ComObject1>>`)
|
||||
/// - the unwrap function (`&self -> ComPtr<actual::ComObject1>` panicing on failure to cast)
|
||||
/// - the unwrap function (`&self -> ComPtr<actual::ComObject1>` panicking on failure to cast)
|
||||
///
|
||||
/// ```rust
|
||||
/// # pub use d3d12::weak_com_inheritance_chain;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -363,7 +363,7 @@ SPV-IN
|
|||
- Fix clippy lints for 1.63 by @JCapucho in https://github.com/gfx-rs/naga/pull/2026
|
||||
- Saturate by @evahop in https://github.com/gfx-rs/naga/pull/2025
|
||||
- Use `Option::as_deref` as appropriate. by @jimblandy in https://github.com/gfx-rs/naga/pull/2040
|
||||
- Explicitely enable std for indexmap by @maxammann in https://github.com/gfx-rs/naga/pull/2062
|
||||
- Explicitly enable std for indexmap by @maxammann in https://github.com/gfx-rs/naga/pull/2062
|
||||
- Fix compiler warning by @Gordon-F in https://github.com/gfx-rs/naga/pull/2074
|
||||
|
||||
API
|
||||
|
@ -466,7 +466,7 @@ Main breaking changes
|
|||
- `findLsb` -> `firstTrailingBit`
|
||||
- `findMsb` -> `firstLeadingBit`
|
||||
|
||||
Specification Changes (relavant changes have also been applied to the WGSL backend)
|
||||
Specification Changes (relevant changes have also been applied to the WGSL backend)
|
||||
|
||||
- Add support for `break if` ([#1993](https://github.com/gfx-rs/naga/pull/1993)) **@JCapucho**
|
||||
- Update number literal format ([#1863](https://github.com/gfx-rs/naga/pull/1863)) **@teoxoy**
|
||||
|
@ -479,7 +479,7 @@ Specification Changes (relavant changes have also been applied to the WGSL backe
|
|||
- Use commas to separate struct members instead of semicolons ([#1773](https://github.com/gfx-rs/naga/pull/1773)) **@Gordon-F**
|
||||
- Rename `findLsb`/`findMsb` to `firstTrailingBit`/`firstLeadingBit` ([#1735](https://github.com/gfx-rs/naga/pull/1735)) **@kvark**
|
||||
- Make parenthesis optional for `if` and `switch` statements ([#1725](https://github.com/gfx-rs/naga/pull/1725)) **@Gordon-F**
|
||||
- Declare attribtues with `@attrib` instead of `[[attrib]]` ([#1676](https://github.com/gfx-rs/naga/pull/1676)) **@kvark**
|
||||
- Declare attributes with `@attrib` instead of `[[attrib]]` ([#1676](https://github.com/gfx-rs/naga/pull/1676)) **@kvark**
|
||||
- Allow non-structure buffer types ([#1682](https://github.com/gfx-rs/naga/pull/1682)) **@kvark**
|
||||
- Remove `stride` attribute ([#1681](https://github.com/gfx-rs/naga/pull/1681)) **@kvark**
|
||||
|
||||
|
@ -516,7 +516,7 @@ SPV-IN
|
|||
GLSL-IN
|
||||
|
||||
- Don't allow empty last case in switch ([#1981](https://github.com/gfx-rs/naga/pull/1981)) **@JCapucho**
|
||||
- Fix last case falltrough and empty switch ([#1981](https://github.com/gfx-rs/naga/pull/1981)) **@JCapucho**
|
||||
- Fix last case fallthrough and empty switch ([#1981](https://github.com/gfx-rs/naga/pull/1981)) **@JCapucho**
|
||||
- Splat inputs for smoothstep if needed ([#1976](https://github.com/gfx-rs/naga/pull/1976)) **@JCapucho**
|
||||
- Fix parameter not changing to depth ([#1967](https://github.com/gfx-rs/naga/pull/1967)) **@JCapucho**
|
||||
- Fix matrix multiplication check ([#1953](https://github.com/gfx-rs/naga/pull/1953)) **@JCapucho**
|
||||
|
|
|
@ -433,7 +433,7 @@ impl<'a, W> Writer<'a, W> {
|
|||
{
|
||||
for (_, expr) in expressions.iter() {
|
||||
match *expr {
|
||||
// Check for queries that neeed aditonal features
|
||||
// Check for queries that need aditonal features
|
||||
Expression::ImageQuery {
|
||||
image,
|
||||
query,
|
||||
|
|
|
@ -146,7 +146,7 @@ impl Version {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns true if targetting WebGL
|
||||
/// Returns true if targeting WebGL
|
||||
const fn is_webgl(&self) -> bool {
|
||||
match *self {
|
||||
Version::Desktop(_) => false,
|
||||
|
@ -340,9 +340,9 @@ pub struct TextureMapping {
|
|||
///
|
||||
/// Push constants are emulated using traditional uniforms in OpenGL.
|
||||
///
|
||||
/// These are composed of a set of primatives (scalar, vector, matrix) that
|
||||
/// These are composed of a set of primitives (scalar, vector, matrix) that
|
||||
/// are given names. Because they are not backed by the concept of a buffer,
|
||||
/// we must do the work of calculating the offset of each primative in the
|
||||
/// we must do the work of calculating the offset of each primitive in the
|
||||
/// push constant block.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PushConstantItem {
|
||||
|
@ -394,11 +394,11 @@ impl IdGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
/// Assorted options needed for generting varyings.
|
||||
/// Assorted options needed for generating varyings.
|
||||
#[derive(Clone, Copy)]
|
||||
struct VaryingOptions {
|
||||
output: bool,
|
||||
targetting_webgl: bool,
|
||||
targeting_webgl: bool,
|
||||
draw_parameters: bool,
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,7 @@ impl VaryingOptions {
|
|||
const fn from_writer_options(options: &Options, output: bool) -> Self {
|
||||
Self {
|
||||
output,
|
||||
targetting_webgl: options.version.is_webgl(),
|
||||
targeting_webgl: options.version.is_webgl(),
|
||||
draw_parameters: options.writer_flags.contains(WriterFlags::DRAW_PARAMETERS),
|
||||
}
|
||||
}
|
||||
|
@ -1849,7 +1849,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
size: usize,
|
||||
ctx: &back::FunctionCtx,
|
||||
) -> BackendResult {
|
||||
// Write parantheses around the dot product expression to prevent operators
|
||||
// Write parentheses around the dot product expression to prevent operators
|
||||
// with different precedences from applying earlier.
|
||||
write!(self.out, "(")?;
|
||||
|
||||
|
@ -3795,11 +3795,11 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
// Sampled images inherit the policy from the user passed policies
|
||||
crate::ImageClass::Sampled { .. } => ("texelFetch", self.policies.image_load),
|
||||
crate::ImageClass::Storage { .. } => {
|
||||
// OpenGL ES 3.1 mentiones in Chapter "8.22 Texture Image Loads and Stores" that:
|
||||
// OpenGL ES 3.1 mentions in Chapter "8.22 Texture Image Loads and Stores" that:
|
||||
// "Invalid image loads will return a vector where the value of R, G, and B components
|
||||
// is 0 and the value of the A component is undefined."
|
||||
//
|
||||
// OpenGL 4.2 Core mentiones in Chapter "3.9.20 Texture Image Loads and Stores" that:
|
||||
// OpenGL 4.2 Core mentions in Chapter "3.9.20 Texture Image Loads and Stores" that:
|
||||
// "Invalid image loads will return zero."
|
||||
//
|
||||
// So, we only inject bounds checks for ES
|
||||
|
@ -3832,7 +3832,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
// expressions so we can be sure that after we test a
|
||||
// condition it will be true for the next ones
|
||||
|
||||
// Write parantheses around the ternary operator to prevent problems with
|
||||
// Write parentheses around the ternary operator to prevent problems with
|
||||
// expressions emitted before or after it having more precedence
|
||||
write!(self.out, "(",)?;
|
||||
|
||||
|
@ -3856,7 +3856,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
}
|
||||
|
||||
// We now need to write the size checks for the coordinates and array index
|
||||
// first we write the comparation function in case the image is 1D non arrayed
|
||||
// first we write the comparison function in case the image is 1D non arrayed
|
||||
// (and no 1D to 2D hack was needed) we are comparing scalars so the less than
|
||||
// operator will suffice, but otherwise we'll be comparing two vectors so we'll
|
||||
// need to use the `lessThan` function but it returns a vector of booleans (one
|
||||
|
@ -3883,7 +3883,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
// coordinates from the image size.
|
||||
write!(self.out, ", ")?;
|
||||
} else {
|
||||
// If we didn't use it (ie. 1D images) we perform the comparsion
|
||||
// If we didn't use it (ie. 1D images) we perform the comparison
|
||||
// using the less than operator.
|
||||
write!(self.out, " < ")?;
|
||||
}
|
||||
|
@ -4002,7 +4002,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
// Get the kind of the output value.
|
||||
let kind = match class {
|
||||
// Only sampled images can reach here since storage images
|
||||
// don't need bounds checks and depth images aren't implmented
|
||||
// don't need bounds checks and depth images aren't implemented
|
||||
crate::ImageClass::Sampled { kind, .. } => kind,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
@ -4018,7 +4018,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
|||
self.write_zero_init_scalar(kind)?;
|
||||
// Close the zero value constructor
|
||||
write!(self.out, ")")?;
|
||||
// Close the parantheses surrounding our ternary
|
||||
// Close the parentheses surrounding our ternary
|
||||
write!(self.out, ")")?;
|
||||
}
|
||||
|
||||
|
@ -4376,7 +4376,7 @@ const fn glsl_built_in(built_in: crate::BuiltIn, options: VaryingOptions) -> &'s
|
|||
"gl_FragCoord"
|
||||
}
|
||||
}
|
||||
Bi::ViewIndex if options.targetting_webgl => "int(gl_ViewID_OVR)",
|
||||
Bi::ViewIndex if options.targeting_webgl => "int(gl_ViewID_OVR)",
|
||||
Bi::ViewIndex => "gl_ViewIndex",
|
||||
// vertex
|
||||
Bi::BaseInstance => "uint(gl_BaseInstance)",
|
||||
|
@ -4387,7 +4387,7 @@ const fn glsl_built_in(built_in: crate::BuiltIn, options: VaryingOptions) -> &'s
|
|||
if options.draw_parameters {
|
||||
"(uint(gl_InstanceID) + uint(gl_BaseInstanceARB))"
|
||||
} else {
|
||||
// Must match FISRT_INSTANCE_BINDING
|
||||
// Must match FIRST_INSTANCE_BINDING
|
||||
"(uint(gl_InstanceID) + naga_vs_first_instance)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2269,7 +2269,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
|
|||
index: u32,
|
||||
) -> BackendResult {
|
||||
match *resolved {
|
||||
// We specifcally lift the ValuePointer to this case. While `[0]` is valid
|
||||
// We specifically lift the ValuePointer to this case. While `[0]` is valid
|
||||
// HLSL for any vector behind a value pointer, FXC completely miscompiles
|
||||
// it and generates completely nonsensical DXBC.
|
||||
//
|
||||
|
|
|
@ -1166,7 +1166,7 @@ impl<W: Write> Writer<W> {
|
|||
size: usize,
|
||||
context: &ExpressionContext,
|
||||
) -> BackendResult {
|
||||
// Write parantheses around the dot product expression to prevent operators
|
||||
// Write parentheses around the dot product expression to prevent operators
|
||||
// with different precedences from applying earlier.
|
||||
write!(self.out, "(")?;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ trait Access {
|
|||
/// the level of detail, and `sample_id` is the index of the sample to
|
||||
/// access in a multisampled texel.
|
||||
///
|
||||
/// Ths method assumes that `coordinates_id` has already had the image array
|
||||
/// This method assumes that `coordinates_id` has already had the image array
|
||||
/// index, if any, folded in, as done by `write_image_coordinates`.
|
||||
///
|
||||
/// Return the value id produced by the instruction, if any.
|
||||
|
|
|
@ -72,7 +72,7 @@ pub fn compact(module: &mut crate::Module) {
|
|||
})
|
||||
.collect();
|
||||
|
||||
// Similiarly, observe what each entry point actually uses.
|
||||
// Similarly, observe what each entry point actually uses.
|
||||
log::trace!("tracing entry points");
|
||||
let entry_point_maps: Vec<FunctionMap> = module
|
||||
.entry_points
|
||||
|
|
|
@ -98,9 +98,9 @@ pub struct EntryArg {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct VariableReference {
|
||||
pub expr: Handle<Expression>,
|
||||
/// Wether the variable is of a pointer type (and needs loading) or not
|
||||
/// Whether the variable is of a pointer type (and needs loading) or not
|
||||
pub load: bool,
|
||||
/// Wether the value of the variable can be changed or not
|
||||
/// Whether the value of the variable can be changed or not
|
||||
pub mutable: bool,
|
||||
pub constant: Option<(Handle<Constant>, Handle<Type>)>,
|
||||
pub entry_arg: Option<usize>,
|
||||
|
|
|
@ -1057,7 +1057,7 @@ impl<'a> Context<'a> {
|
|||
//
|
||||
// The ternary operator is defined to only evaluate one of the two possible
|
||||
// expressions which means that it's behavior is that of an `if` statement,
|
||||
// and it's merely syntatic sugar for it.
|
||||
// and it's merely syntactic sugar for it.
|
||||
HirExprKind::Conditional {
|
||||
condition,
|
||||
accept,
|
||||
|
@ -1164,7 +1164,7 @@ impl<'a> Context<'a> {
|
|||
meta,
|
||||
);
|
||||
|
||||
// Note: `Expression::Load` must be emited before it's used so make
|
||||
// Note: `Expression::Load` must be emitted before it's used so make
|
||||
// sure the emitter is active here.
|
||||
self.add_expression(
|
||||
Expression::Load {
|
||||
|
|
|
@ -50,7 +50,7 @@ type Result<T> = std::result::Result<T, Error>;
|
|||
pub struct Options {
|
||||
/// The shader stage in the pipeline.
|
||||
pub stage: ShaderStage,
|
||||
/// Preprocesor definitions to be used, akin to having
|
||||
/// Preprocessor definitions to be used, akin to having
|
||||
/// ```glsl
|
||||
/// #define key value
|
||||
/// ```
|
||||
|
|
|
@ -49,7 +49,7 @@ impl<'source> ParsingContext<'source> {
|
|||
}
|
||||
|
||||
// Type names can identify either declaration statements or type constructors
|
||||
// depending on wether the token following the type name is a `(` (LeftParen)
|
||||
// depending on whether the token following the type name is a `(` (LeftParen)
|
||||
if self.peek_type_name(frontend) {
|
||||
// Start by consuming the type name so that we can peek the token after it
|
||||
let token = self.bump(frontend)?;
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::{
|
|||
};
|
||||
|
||||
impl<'source> ParsingContext<'source> {
|
||||
/// Parses an optional array_specifier returning wether or not it's present
|
||||
/// Parses an optional array_specifier returning whether or not it's present
|
||||
/// and modifying the type handle if it exists
|
||||
pub fn parse_array_specifier(
|
||||
&mut self,
|
||||
|
|
|
@ -151,7 +151,7 @@ impl ops::Index<Handle<crate::Expression>> for Typifier {
|
|||
|
||||
/// Type representing a lexical scope, associating a name to a single variable
|
||||
///
|
||||
/// The scope is generic over the variable representation and name representaion
|
||||
/// The scope is generic over the variable representation and name representation
|
||||
/// in order to allow larger flexibility on the frontends on how they might
|
||||
/// represent them.
|
||||
type Scope<Name, Var> = FastHashMap<Name, Var>;
|
||||
|
|
|
@ -2559,7 +2559,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
|
|||
}
|
||||
Op::ShiftRightLogical => {
|
||||
inst.expect(5)?;
|
||||
//TODO: convert input and result to usigned
|
||||
//TODO: convert input and result to unsigned
|
||||
parse_expr_op!(crate::BinaryOperator::ShiftRight, SHIFT)?;
|
||||
}
|
||||
Op::ShiftRightArithmetic => {
|
||||
|
@ -3387,7 +3387,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
|
|||
|
||||
// Check if any previous case already used this target block id, if so
|
||||
// group them together to reorder them later so that no weird
|
||||
// falltrough cases happen.
|
||||
// fallthrough cases happen.
|
||||
if let Some(&mut (_, ref mut literals)) = self.switch_cases.get_mut(&target)
|
||||
{
|
||||
literals.push(literal as i32);
|
||||
|
@ -3411,11 +3411,11 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
|
|||
|
||||
// Loop trough the collected target blocks creating a new case for each
|
||||
// literal pointing to it, only one case will have the true body and all the
|
||||
// others will be empty falltrough so that they all execute the same body
|
||||
// others will be empty fallthrough so that they all execute the same body
|
||||
// without duplicating code.
|
||||
//
|
||||
// Since `switch_cases` is an indexmap the order of insertion is preserved
|
||||
// this is needed because spir-v defines falltrough order in the switch
|
||||
// this is needed because spir-v defines fallthrough order in the switch
|
||||
// instruction.
|
||||
let mut cases = Vec::with_capacity((inst.wc as usize - 3) / 2);
|
||||
for &(case_body_idx, ref literals) in self.switch_cases.values() {
|
||||
|
|
|
@ -184,7 +184,7 @@ pub enum Error<'a> {
|
|||
NonPowerOfTwoAlignAttribute(Span),
|
||||
InconsistentBinding(Span),
|
||||
TypeNotConstructible(Span),
|
||||
TypeNotInferrable(Span),
|
||||
TypeNotInferable(Span),
|
||||
InitializationTypeMismatch {
|
||||
name: Span,
|
||||
expected: String,
|
||||
|
@ -500,7 +500,7 @@ impl<'a> Error<'a> {
|
|||
labels: vec![(span, "type is not constructible".into())],
|
||||
notes: vec![],
|
||||
},
|
||||
Error::TypeNotInferrable(span) => ParseError {
|
||||
Error::TypeNotInferable(span) => ParseError {
|
||||
message: "type can't be inferred".to_string(),
|
||||
labels: vec![(span, "type can't be inferred".into())],
|
||||
notes: vec![],
|
||||
|
|
|
@ -167,7 +167,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
|
|||
| Constructor::PartialArray => {
|
||||
// We have no arguments from which to infer the result type, so
|
||||
// partial constructors aren't acceptable here.
|
||||
return Err(Error::TypeNotInferrable(ty_span));
|
||||
return Err(Error::TypeNotInferable(ty_span));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -765,7 +765,7 @@ pub enum TypeInner {
|
|||
space: AddressSpace,
|
||||
},
|
||||
|
||||
/// Homogenous list of elements.
|
||||
/// Homogeneous list of elements.
|
||||
///
|
||||
/// The `base` type must be a [`SIZED`], [`DATA`] type.
|
||||
///
|
||||
|
|
|
@ -725,7 +725,7 @@ impl GlobalCtx<'_> {
|
|||
/// Normally, this would just be an iterator over `components`. However,
|
||||
/// `Compose` expressions can concatenate vectors, in which case the i'th
|
||||
/// value being composed is not generally the i'th element of `components`.
|
||||
/// This function consults `ty` to decide if this concatenation is occuring,
|
||||
/// This function consults `ty` to decide if this concatenation is occurring,
|
||||
/// and returns an iterator that produces the components of the result of
|
||||
/// the `Compose` expression in either case.
|
||||
pub fn flatten_compose<'arenas>(
|
||||
|
|
|
@ -106,7 +106,7 @@ pub enum FunctionError {
|
|||
MissingDefaultCase,
|
||||
#[error("Multiple `default` cases are present")]
|
||||
MultipleDefaultCases,
|
||||
#[error("The last `switch` case contains a `falltrough`")]
|
||||
#[error("The last `switch` case contains a `fallthrough`")]
|
||||
LastCaseFallTrough,
|
||||
#[error("The pointer {0:?} doesn't relate to a valid destination for a store")]
|
||||
InvalidStorePointer(Handle<crate::Expression>),
|
||||
|
|
|
@ -619,7 +619,7 @@ impl super::Validator {
|
|||
ctx.validate(fr.ty, fr.binding.as_ref())
|
||||
.map_err_inner(|e| EntryPointError::Result(e).with_span())?;
|
||||
if ctx.second_blend_source {
|
||||
// Only the first location may be used whhen dual source blending
|
||||
// Only the first location may be used when dual source blending
|
||||
if ctx.location_mask.len() == 1 && ctx.location_mask.contains(0) {
|
||||
info.dual_source_blending = true;
|
||||
} else {
|
||||
|
|
|
@ -104,7 +104,7 @@ bitflags::bitflags! {
|
|||
const MULTISAMPLED_SHADING = 0x800;
|
||||
/// Support for ray queries and acceleration structures.
|
||||
const RAY_QUERY = 0x1000;
|
||||
/// Support for generating two sources for blending from fragement shaders.
|
||||
/// Support for generating two sources for blending from fragment shaders.
|
||||
const DUAL_SOURCE_BLENDING = 0x2000;
|
||||
/// Support for arrayed cube textures.
|
||||
const CUBE_ARRAY_TEXTURES = 0x4000;
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.toml":"92c0bcfb5bf68fb55acb6e7b826ec07c1cfdd6d53b057c16a5c698e044ea228e","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","build.rs":"a99478d7f63fb41429e3834f4d0e5cd333f94ba1834c68295f929170e16987de","src/any_surface.rs":"1c032bc1894a222a47f0116b976f1543c1140c0534678502ee1172d4f77fc515","src/binding_model.rs":"b3a57236d6a554f2ef604135ba35c09ae9c99108486a3be87471c1dfd792321d","src/command/bind.rs":"a37f042484b65d9fdea4cdab3667381623ee9a8943a6d32683d410b92736d306","src/command/bundle.rs":"91513a3be0adf46a9f3454b6a3d00ff6686729eb91fe9dd6d732cbfa1ff6d1d8","src/command/clear.rs":"b20e93c4b8cb47062b38e472f78d28d9ec00fd1169b17a87094be7f9d1c995e1","src/command/compute.rs":"84c4ea6dde64893562aeddd16869ed02187145b8438775fd4419a1e6657e2b63","src/command/draw.rs":"e8a664fc248e273e8c0e4aaeb645010b3f4ec61d29d858137f31f6f653c86542","src/command/memory_init.rs":"6ec93b9e2eb21edaa534e60770b4ba95735e9de61e74d827bc492df8e3639449","src/command/mod.rs":"d6a66a5796bd824be72af2c8d3ece59a507090c61cb50e9856eb4c70a28945e2","src/command/query.rs":"dffc843746b10ba9a50b8a2b92a59b407b56a845619a96d72a5883588fcb50f0","src/command/render.rs":"e6e5eaafccdb5ea7e4c61e324ef8670ee5c7cf424bbf257e56f6f78d5b19046b","src/command/transfer.rs":"9f3d7a0500fafc4066d62f3ecbda6f9cbb9d3254a9d8fd509ed73aeb963e198c","src/conv.rs":"7e3ffe33b47a6fd3617aabf9f11cc68f1ccbee2c7343b8dbbcd0e8f3447e1ad8","src/device/any_device.rs":"4dd3d6e384c4a37eba70cce7d170c0074d72116cb13d3c83ca814f72e2cfb45f","src/device/bgl.rs":"292a0f07121aec78e86e0125d08785072bd4b7e763c99975b581b342ac4fcaa3","src/device/global.rs":"1e1aa1879871c4ad8b99e7ea1d771680352189526b8a595ef677b7707448c8b7","src/device/life.rs":"1c6829b6d7ca9571d46282e0b3fbc4c747bfa0ef61cf57b1072998c8b1b04e9d","src/device/mod.rs":"fff41f92e1a9f6660e18dc30452d9911ca827701bb8303af2ae06f1c1e1a795f","src/device/queue.rs":"2ffc477d1bebb35a1fc8e46f4ca2c5ef50a4eb6034968f076062461b2e678699","src/device/resource.rs":"8f42e00b8a7e2ea3e7e6bbb6bd429229c7349b9eef91cedde0b995467e52d2d5","src/device/trace.rs":"9deb1b083165e07253b4928ac2f564aba06f9089c3aca1c0a1d438d87d981542","src/error.rs":"e3b6b7a69877437f4e46af7f0e8ca1db1822beae7c8448db41c2bae0f64b2bb4","src/global.rs":"0966475959706650fd036a18d51441a8e14c3ef10107db617f597614ca47e50a","src/hal_api.rs":"1cd9c3fe1c9d8c3a24e3e7f963a2ef26e056a2b26d529b840dbc969090aaf201","src/hash_utils.rs":"e8d484027c7ce81978e4679a5e20af9416ab7d2fa595f1ca95992b29d625b0ca","src/hub.rs":"352a1b75d4535f24b06d16134421db98f910e6e719f50f863a204df6768e3369","src/id.rs":"a7d271dccf512a623f8da16ac670779b544cc10c645556cf0b5608e8fa987dda","src/identity.rs":"c6a719389d71bb11c9ceaeadb0496f8b4c6ad24e35597e12b40980ad7ad72f10","src/init_tracker/buffer.rs":"61eb9cfaa312135b7a937ff6a3117f531b5b7323fae6553a41d6de9bc106d7e0","src/init_tracker/mod.rs":"43d98d2b2ebf92b3b77c5bd049c66e29a021020b2ab2c1676de56fd305b6a115","src/init_tracker/texture.rs":"030fd594bf9948fad391390d85c5e1fec7eaf67b6e812c60f2dd59bc4fda8fd5","src/instance.rs":"c9b5b53a0aeac8e117d49a3a007fab001cd5737e29dd75388cdbfc24f3d8df08","src/lib.rs":"b2cf7a6d4acc800e12b6162c0a876e866d0e9b76ef98e90fb985eadedf6fb66d","src/pipeline.rs":"1a47caded7956da1b4f2cf22bc8a41a29941f1608ea2a58b0ac16edecce7eed0","src/pool.rs":"8c88d86763bc465bf628157c62db9641f6789ece684cc4a20a2fdf50d37e0e16","src/present.rs":"86b1e8bd7314f77f083be6d89a2f734e92f2ed11c86eb4c912c754fcdaa2e597","src/registry.rs":"dbc9310a24a843cf6b94a4bab78b0bb5f325e18c1f3c19c94d4f12b4f29e8598","src/resource.rs":"811df36f15d3e8ed1ecefc5b561f61adf70c00c94d3e2507959d24f0835bd0b6","src/snatch.rs":"dd514e1954137eec4a0753a3670e8180796ac9c9ff770a1ca1813863debce823","src/storage.rs":"1624457eacbe27be5116fe23d2653cf609ba4fe16977daadd1a770556dbf9134","src/track/buffer.rs":"04f1ebb5f7232fb054f78a8b9a4eec18bd7d53a9952026bc8928049b89ebd8a6","src/track/metadata.rs":"ac82a9c69b0a141b5c3ca69b203c5aa2a17578b598cab3ae156b917cef734b97","src/track/mod.rs":"ddf206a0e74825d9b501d569db1f6990d49c067bb9b315f2ba15df6750f02d97","src/track/range.rs":"2a15794e79b0470d5ba6b3267173a42f34312878e1cb288f198d2854a7888e53","src/track/stateless.rs":"8d67e1deba45f18f1e3b88adc5ba279c0bfba4f94bada5b504e802a3f6251b50","src/track/texture.rs":"0bf9a5d68d0594798bbfab0efd567937620107b98fb1eaa15823fa9318885d04","src/validation.rs":"613c58c3601f36d6aa5986cea01f30497c6bd4ceb990824904d101b2327941a9"},"package":null}
|
||||
{"files":{"Cargo.toml":"92c0bcfb5bf68fb55acb6e7b826ec07c1cfdd6d53b057c16a5c698e044ea228e","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","build.rs":"a99478d7f63fb41429e3834f4d0e5cd333f94ba1834c68295f929170e16987de","src/any_surface.rs":"1c032bc1894a222a47f0116b976f1543c1140c0534678502ee1172d4f77fc515","src/binding_model.rs":"2bd4e4a36742ccf0cab0afa039411a791e2a6e9ea3909d0b85cc9a84cc151c6b","src/command/bind.rs":"a37f042484b65d9fdea4cdab3667381623ee9a8943a6d32683d410b92736d306","src/command/bundle.rs":"91513a3be0adf46a9f3454b6a3d00ff6686729eb91fe9dd6d732cbfa1ff6d1d8","src/command/clear.rs":"b20e93c4b8cb47062b38e472f78d28d9ec00fd1169b17a87094be7f9d1c995e1","src/command/compute.rs":"eb60f0e2842dd20b366905225af24f4ca2a1b0c67914b86009c5b870b26f747f","src/command/draw.rs":"e8a664fc248e273e8c0e4aaeb645010b3f4ec61d29d858137f31f6f653c86542","src/command/memory_init.rs":"6ec93b9e2eb21edaa534e60770b4ba95735e9de61e74d827bc492df8e3639449","src/command/mod.rs":"d6a66a5796bd824be72af2c8d3ece59a507090c61cb50e9856eb4c70a28945e2","src/command/query.rs":"dffc843746b10ba9a50b8a2b92a59b407b56a845619a96d72a5883588fcb50f0","src/command/render.rs":"c3783b4f19b4eafb33f94554aea69408d42e40b5e98da22aa804a0931430ea6f","src/command/transfer.rs":"bf1077d1a99a258bad46087ae7234703627e7f4d30b38e6142d016c02deaad3a","src/conv.rs":"7e3ffe33b47a6fd3617aabf9f11cc68f1ccbee2c7343b8dbbcd0e8f3447e1ad8","src/device/any_device.rs":"65f47b58939b60f88f47861e65d5d45209492df8e73e7c1b60b3b459f510c09e","src/device/bgl.rs":"ec8bdd6e9b4cd50c25bed317275863d0c16bb6619f62ed85bf0464948010dfc1","src/device/global.rs":"7d70a45bd39e251c6945fc475883c4e69632f92a7abe263adab6e47a248de5a4","src/device/life.rs":"cd12343d5a14d82b18b787991811b36f420719776336f8a65b45c32fd47a77d4","src/device/mod.rs":"fff41f92e1a9f6660e18dc30452d9911ca827701bb8303af2ae06f1c1e1a795f","src/device/queue.rs":"2ffc477d1bebb35a1fc8e46f4ca2c5ef50a4eb6034968f076062461b2e678699","src/device/resource.rs":"4f22cf27da8d829b624877d7d3bb10971a0e8fb7c4f95d85d5011049a010684a","src/device/trace.rs":"9deb1b083165e07253b4928ac2f564aba06f9089c3aca1c0a1d438d87d981542","src/error.rs":"e3b6b7a69877437f4e46af7f0e8ca1db1822beae7c8448db41c2bae0f64b2bb4","src/global.rs":"0966475959706650fd036a18d51441a8e14c3ef10107db617f597614ca47e50a","src/hal_api.rs":"1cd9c3fe1c9d8c3a24e3e7f963a2ef26e056a2b26d529b840dbc969090aaf201","src/hash_utils.rs":"e8d484027c7ce81978e4679a5e20af9416ab7d2fa595f1ca95992b29d625b0ca","src/hub.rs":"352a1b75d4535f24b06d16134421db98f910e6e719f50f863a204df6768e3369","src/id.rs":"c736c0b3d35cf620e2c01322d57c4938b42828b39948ecad82d39fc39c1093c1","src/identity.rs":"c6a719389d71bb11c9ceaeadb0496f8b4c6ad24e35597e12b40980ad7ad72f10","src/init_tracker/buffer.rs":"61eb9cfaa312135b7a937ff6a3117f531b5b7323fae6553a41d6de9bc106d7e0","src/init_tracker/mod.rs":"a0f64730cc025113b656b4690f9dcb0ec18b8770bc7ef24c7b4ad8bebae03d24","src/init_tracker/texture.rs":"030fd594bf9948fad391390d85c5e1fec7eaf67b6e812c60f2dd59bc4fda8fd5","src/instance.rs":"c9b5b53a0aeac8e117d49a3a007fab001cd5737e29dd75388cdbfc24f3d8df08","src/lib.rs":"49174591f8116c3b8fadb185f89ce69ae931ee6e9f639d2558848db82ea1651f","src/pipeline.rs":"300f58afc16c454ce52aabff6debd7a7db85ed627b111a8801bcb201827f110c","src/pool.rs":"778ea1c23fcfaaa5001606e686f712f606826039d60dd5a3cd26e7de91ac057a","src/present.rs":"86b1e8bd7314f77f083be6d89a2f734e92f2ed11c86eb4c912c754fcdaa2e597","src/registry.rs":"dbc9310a24a843cf6b94a4bab78b0bb5f325e18c1f3c19c94d4f12b4f29e8598","src/resource.rs":"cd568c9d1abd4bf740cb86efae7862b5478518f3b1cdaf792ae05b3c0920c8e0","src/snatch.rs":"29a1135ee09c06883eac4df6f45b7220c2ba8f89f34232ea1d270d6e7b05c7a8","src/storage.rs":"f0c41461b8f9cdc862dbd3de04c8e720ee416c7c57310696f6f4fd22183fcc85","src/track/buffer.rs":"65c27dfabe7a1c3e4ddbde7189e53b2e95f3f3663aa82b121801a2fd0dcbd304","src/track/metadata.rs":"ac82a9c69b0a141b5c3ca69b203c5aa2a17578b598cab3ae156b917cef734b97","src/track/mod.rs":"8f03955447544f3ebcb48547440a48d321ad1ff0e0c601a62623b5457763b8de","src/track/range.rs":"2a15794e79b0470d5ba6b3267173a42f34312878e1cb288f198d2854a7888e53","src/track/stateless.rs":"2da10160c46d07ad15986ba6f1356b7933806fc5c3fa5a9d8deea44d9a3c93a7","src/track/texture.rs":"15892e639f2ecbb13c8d34c29e3fd6ad719cb71e2d40c64910b552b8985ddab0","src/validation.rs":"613c58c3601f36d6aa5986cea01f30497c6bd4ceb990824904d101b2327941a9"},"package":null}
|
|
@ -580,7 +580,7 @@ pub enum PushConstantUploadError {
|
|||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct PipelineLayoutDescriptor<'a> {
|
||||
/// Debug label of the pipeine layout.
|
||||
/// Debug label of the pipeline layout.
|
||||
///
|
||||
/// This will show up in graphics debuggers for easy identification.
|
||||
pub label: Label<'a>,
|
||||
|
|
|
@ -423,7 +423,7 @@ impl Global {
|
|||
.map_pass_err(pass_scope)?;
|
||||
|
||||
// Unlike in render passes we can't delay resetting the query sets since
|
||||
// there is no auxillary pass.
|
||||
// there is no auxiliary pass.
|
||||
let range = if let (Some(index_a), Some(index_b)) =
|
||||
(tw.beginning_of_pass_write_index, tw.end_of_pass_write_index)
|
||||
{
|
||||
|
|
|
@ -379,7 +379,7 @@ impl VertexState {
|
|||
fn update_limits(&mut self) {
|
||||
// Implements the validation from https://gpuweb.github.io/gpuweb/#dom-gpurendercommandsmixin-draw
|
||||
// Except that the formula is shuffled to extract the number of vertices in order
|
||||
// to carry the bulk of the computation when changing states intead of when producing
|
||||
// to carry the bulk of the computation when changing states instead of when producing
|
||||
// draws. Draw calls tend to happen at a higher frequency. Here we determine vertex
|
||||
// limits that can be cheaply checked for each draw call.
|
||||
self.vertex_limit = u32::MAX as u64;
|
||||
|
@ -395,7 +395,7 @@ impl VertexState {
|
|||
} else {
|
||||
if vbs.step.stride == 0 {
|
||||
// We already checked that the last stride fits, the same
|
||||
// vertex will be repeated so this slot can accomodate any number of
|
||||
// vertex will be repeated so this slot can accommodate any number of
|
||||
// vertices.
|
||||
continue;
|
||||
}
|
||||
|
@ -1640,7 +1640,7 @@ impl Global {
|
|||
|
||||
// Initialize each `vertex.inputs[i].step` from
|
||||
// `pipeline.vertex_steps[i]`. Enlarge `vertex.inputs`
|
||||
// as necessary to accomodate all slots in the
|
||||
// as necessary to accommodate all slots in the
|
||||
// pipeline. If `vertex.inputs` is longer, fill the
|
||||
// extra entries with default `VertexStep`s.
|
||||
while state.vertex.inputs.len() < vertex_steps_len {
|
||||
|
|
|
@ -69,7 +69,7 @@ pub enum TransferError {
|
|||
dimension: TextureErrorDimension,
|
||||
side: CopySide,
|
||||
},
|
||||
#[error("Unable to select texture aspect {aspect:?} from fromat {format:?}")]
|
||||
#[error("Unable to select texture aspect {aspect:?} from format {format:?}")]
|
||||
InvalidTextureAspect {
|
||||
format: wgt::TextureFormat,
|
||||
aspect: wgt::TextureAspect,
|
||||
|
@ -252,7 +252,7 @@ pub(crate) fn validate_linear_texture_data(
|
|||
) -> Result<(BufferAddress, BufferAddress), TransferError> {
|
||||
// Convert all inputs to BufferAddress (u64) to avoid some of the overflow issues
|
||||
// Note: u64 is not always enough to prevent overflow, especially when multiplying
|
||||
// something with a potentially large depth value, so it is preferrable to validate
|
||||
// something with a potentially large depth value, so it is preferable to validate
|
||||
// the copy size before calling this function (for example via `validate_texture_copy_range`).
|
||||
let copy_width = copy_size.width as BufferAddress;
|
||||
let copy_height = copy_size.height as BufferAddress;
|
||||
|
|
|
@ -38,7 +38,7 @@ impl AnyDevice {
|
|||
}
|
||||
}
|
||||
|
||||
// SAFETY: The pointer returned by Arc::into_raw is gauranteed to be
|
||||
// SAFETY: The pointer returned by Arc::into_raw is guaranteed to be
|
||||
// non-null.
|
||||
let data = unsafe { NonNull::new_unchecked(Arc::into_raw(device).cast_mut()) };
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ pub enum Origin {
|
|||
#[derive(Debug, Default, Clone, Eq)]
|
||||
pub struct EntryMap {
|
||||
/// We use a IndexMap here so that we can sort the entries by their binding index,
|
||||
/// guarenteeing that the hash of equivilant layouts will be the same.
|
||||
/// guaranteeing that the hash of equivalent layouts will be the same.
|
||||
inner: FastIndexMap<u32, wgt::BindGroupLayoutEntry>,
|
||||
/// We keep track of whether the map is sorted or not, so that we can assert that
|
||||
/// it is sorted, so that PartialEq and Hash will be stable.
|
||||
|
@ -68,7 +68,7 @@ impl EntryMap {
|
|||
) -> Result<Self, binding_model::CreateBindGroupLayoutError> {
|
||||
let mut inner = FastIndexMap::with_capacity_and_hasher(entries.len(), Default::default());
|
||||
for entry in entries {
|
||||
if entry.binding > device_limits.max_bindings_per_bind_group {
|
||||
if entry.binding >= device_limits.max_bindings_per_bind_group {
|
||||
return Err(
|
||||
binding_model::CreateBindGroupLayoutError::InvalidBindingIndex {
|
||||
binding: entry.binding,
|
||||
|
|
|
@ -328,7 +328,7 @@ impl Global {
|
|||
|
||||
/// Assign `id_in` an error with the given `label`.
|
||||
///
|
||||
/// See `create_buffer_error` for more context and explaination.
|
||||
/// See `create_buffer_error` for more context and explanation.
|
||||
pub fn create_texture_error<A: HalApi>(&self, id_in: Option<id::TextureId>, label: Label) {
|
||||
let hub = A::hub(self);
|
||||
let fid = hub.textures.prepare(id_in);
|
||||
|
@ -2084,7 +2084,7 @@ impl Global {
|
|||
}
|
||||
|
||||
#[cfg(feature = "replay")]
|
||||
/// Only triange suspected resource IDs. This helps us to avoid ID collisions
|
||||
/// Only triangle suspected resource IDs. This helps us to avoid ID collisions
|
||||
/// upon creating new resources when re-playing a trace.
|
||||
pub fn device_maintain_ids<A: HalApi>(&self, device_id: DeviceId) -> Result<(), InvalidDevice> {
|
||||
let hub = A::hub(self);
|
||||
|
@ -2107,6 +2107,12 @@ impl Global {
|
|||
) -> Result<bool, WaitIdleError> {
|
||||
api_log!("Device::poll");
|
||||
|
||||
let hub = A::hub(self);
|
||||
let device = hub
|
||||
.devices
|
||||
.get(device_id)
|
||||
.map_err(|_| DeviceError::Invalid)?;
|
||||
|
||||
let (closures, queue_empty) = {
|
||||
if let wgt::Maintain::WaitForSubmissionIndex(submission_index) = maintain {
|
||||
if submission_index.queue_id != device_id.transmute() {
|
||||
|
@ -2117,16 +2123,15 @@ impl Global {
|
|||
}
|
||||
}
|
||||
|
||||
let hub = A::hub(self);
|
||||
let device = hub
|
||||
.devices
|
||||
.get(device_id)
|
||||
.map_err(|_| DeviceError::Invalid)?;
|
||||
let fence = device.fence.read();
|
||||
let fence = fence.as_ref().unwrap();
|
||||
device.maintain(fence, maintain)?
|
||||
};
|
||||
|
||||
// Some deferred destroys are scheduled in maintain so run this right after
|
||||
// to avoid holding on to them until the next device poll.
|
||||
device.deferred_resource_destruction();
|
||||
|
||||
closures.fire();
|
||||
|
||||
Ok(queue_empty)
|
||||
|
@ -2519,7 +2524,7 @@ impl Global {
|
|||
});
|
||||
}
|
||||
// ptr points to the beginning of the range we mapped in map_async
|
||||
// rather thant the beginning of the buffer.
|
||||
// rather than the beginning of the buffer.
|
||||
let relative_offset = (offset - range.start) as isize;
|
||||
unsafe { Ok((ptr.as_ptr().offset(relative_offset), range_size)) }
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ impl<A: HalApi> LifetimeTracker<A> {
|
|||
Some(active) => {
|
||||
active.work_done_closures.push(closure);
|
||||
}
|
||||
// We must defer the closure until all previously occuring map_async closures
|
||||
// We must defer the closure until all previously occurring map_async closures
|
||||
// have fired. This is required by the spec.
|
||||
None => {
|
||||
self.work_done_closures.push(closure);
|
||||
|
@ -439,8 +439,8 @@ impl<A: HalApi> LifetimeTracker<A> {
|
|||
let is_removed = trackers.remove_abandoned(id);
|
||||
if is_removed {
|
||||
removed_resources.push(resource.clone());
|
||||
if let Some(ressources) = non_referenced_resources {
|
||||
get_resource_map(ressources).insert(id, resource.clone());
|
||||
if let Some(resources) = non_referenced_resources {
|
||||
get_resource_map(resources).insert(id, resource.clone());
|
||||
}
|
||||
}
|
||||
!is_removed
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#[cfg(feature = "trace")]
|
||||
use crate::device::trace;
|
||||
use crate::{
|
||||
binding_model::{self, BindGroupLayout, BindGroupLayoutEntryError},
|
||||
binding_model::{self, BindGroup, BindGroupLayout, BindGroupLayoutEntryError},
|
||||
command, conv,
|
||||
device::life::{LifetimeTracker, WaitIdleError},
|
||||
device::queue::PendingWrites,
|
||||
device::{
|
||||
bgl, AttachmentData, CommandAllocator, DeviceLostInvocation, MissingDownlevelFlags,
|
||||
bgl,
|
||||
life::{LifetimeTracker, WaitIdleError},
|
||||
queue::PendingWrites,
|
||||
AttachmentData, CommandAllocator, DeviceLostInvocation, MissingDownlevelFlags,
|
||||
MissingFeatures, RenderPassContext, CLEANUP_WAIT_MS,
|
||||
},
|
||||
hal_api::HalApi,
|
||||
|
@ -21,10 +22,9 @@ use crate::{
|
|||
pipeline,
|
||||
pool::ResourcePool,
|
||||
registry::Registry,
|
||||
resource::ResourceInfo,
|
||||
resource::{
|
||||
self, Buffer, QuerySet, Resource, ResourceType, Sampler, Texture, TextureView,
|
||||
TextureViewNotRenderableReason,
|
||||
self, Buffer, QuerySet, Resource, ResourceInfo, ResourceType, Sampler, Texture,
|
||||
TextureView, TextureViewNotRenderableReason,
|
||||
},
|
||||
resource_log,
|
||||
snatch::{SnatchGuard, SnatchLock, Snatchable},
|
||||
|
@ -48,7 +48,7 @@ use std::{
|
|||
num::NonZeroU32,
|
||||
sync::{
|
||||
atomic::{AtomicBool, AtomicU64, Ordering},
|
||||
Arc,
|
||||
Arc, Weak,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -71,7 +71,7 @@ use super::{
|
|||
/// 1. `self.trace` is locked last (unenforced)
|
||||
///
|
||||
/// Right now avoid locking twice same resource or registry in a call execution
|
||||
/// and minimize the locking to the minimum scope possibile
|
||||
/// and minimize the locking to the minimum scope possible
|
||||
/// Unless otherwise specified, no lock may be acquired while holding another lock.
|
||||
/// This means that you must inspect function calls made while a lock is held
|
||||
/// to see what locks the callee may try to acquire.
|
||||
|
@ -129,10 +129,16 @@ pub struct Device<A: HalApi> {
|
|||
pub(crate) downlevel: wgt::DownlevelCapabilities,
|
||||
pub(crate) instance_flags: wgt::InstanceFlags,
|
||||
pub(crate) pending_writes: Mutex<Option<PendingWrites<A>>>,
|
||||
pub(crate) deferred_destroy: Mutex<Vec<DeferredDestroy<A>>>,
|
||||
#[cfg(feature = "trace")]
|
||||
pub(crate) trace: Mutex<Option<trace::Trace>>,
|
||||
}
|
||||
|
||||
pub(crate) enum DeferredDestroy<A: HalApi> {
|
||||
TextureView(Weak<TextureView<A>>),
|
||||
BindGroup(Weak<BindGroup<A>>),
|
||||
}
|
||||
|
||||
impl<A: HalApi> std::fmt::Debug for Device<A> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("Device")
|
||||
|
@ -285,6 +291,7 @@ impl<A: HalApi> Device<A> {
|
|||
downlevel,
|
||||
instance_flags,
|
||||
pending_writes: Mutex::new(Some(pending_writes)),
|
||||
deferred_destroy: Mutex::new(Vec::new()),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -300,6 +307,56 @@ impl<A: HalApi> Device<A> {
|
|||
self.life_tracker.lock()
|
||||
}
|
||||
|
||||
/// Run some destroy operations that were deferred.
|
||||
///
|
||||
/// Destroying the resources requires taking a write lock on the device's snatch lock,
|
||||
/// so a good reason for deferring resource destruction is when we don't know for sure
|
||||
/// how risky it is to take the lock (typically, it shouldn't be taken from the drop
|
||||
/// implementation of a reference-counted structure).
|
||||
/// The snatch lock must not be held while this function is called.
|
||||
pub(crate) fn deferred_resource_destruction(&self) {
|
||||
while let Some(item) = self.deferred_destroy.lock().pop() {
|
||||
match item {
|
||||
DeferredDestroy::TextureView(view) => {
|
||||
let Some(view) = view.upgrade() else {
|
||||
continue;
|
||||
};
|
||||
let Some(raw_view) = view.raw.snatch(self.snatchable_lock.write()) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
resource_log!("Destroy raw TextureView (destroyed) {:?}", view.label());
|
||||
#[cfg(feature = "trace")]
|
||||
if let Some(t) = self.trace.lock().as_mut() {
|
||||
t.add(trace::Action::DestroyTextureView(view.info.id()));
|
||||
}
|
||||
unsafe {
|
||||
use hal::Device;
|
||||
self.raw().destroy_texture_view(raw_view);
|
||||
}
|
||||
}
|
||||
DeferredDestroy::BindGroup(bind_group) => {
|
||||
let Some(bind_group) = bind_group.upgrade() else {
|
||||
continue;
|
||||
};
|
||||
let Some(raw_bind_group) = bind_group.raw.snatch(self.snatchable_lock.write()) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
resource_log!("Destroy raw BindGroup (destroyed) {:?}", bind_group.label());
|
||||
#[cfg(feature = "trace")]
|
||||
if let Some(t) = self.trace.lock().as_mut() {
|
||||
t.add(trace::Action::DestroyBindGroup(bind_group.info.id()));
|
||||
}
|
||||
unsafe {
|
||||
use hal::Device;
|
||||
self.raw().destroy_bind_group(raw_bind_group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Check this device for completed commands.
|
||||
///
|
||||
/// The `maintain` argument tells how the maintence function should behave, either
|
||||
|
@ -1972,7 +2029,7 @@ impl<A: HalApi> Device<A> {
|
|||
layout: &Arc<BindGroupLayout<A>>,
|
||||
desc: &binding_model::BindGroupDescriptor,
|
||||
hub: &Hub<A>,
|
||||
) -> Result<binding_model::BindGroup<A>, binding_model::CreateBindGroupError> {
|
||||
) -> Result<BindGroup<A>, binding_model::CreateBindGroupError> {
|
||||
use crate::binding_model::{BindingResource as Br, CreateBindGroupError as Error};
|
||||
{
|
||||
// Check that the number of entries in the descriptor matches
|
||||
|
@ -2212,7 +2269,7 @@ impl<A: HalApi> Device<A> {
|
|||
.map_err(DeviceError::from)?
|
||||
};
|
||||
|
||||
Ok(binding_model::BindGroup {
|
||||
Ok(BindGroup {
|
||||
raw: Snatchable::new(raw),
|
||||
device: self.clone(),
|
||||
layout: layout.clone(),
|
||||
|
|
|
@ -80,7 +80,7 @@ impl RawId {
|
|||
/// Coerce a slice of identifiers into a slice of optional raw identifiers.
|
||||
///
|
||||
/// There's two reasons why we know this is correct:
|
||||
/// * `Option<T>` is guarnateed to be niche-filled to 0's.
|
||||
/// * `Option<T>` is guaranteed to be niche-filled to 0's.
|
||||
/// * The `T` in `Option<T>` can inhabit any representation except 0's, since
|
||||
/// its underlying representation is `NonZero*`.
|
||||
pub fn as_option_slice<T: Marker>(ids: &[Id<T>]) -> &[Option<Id<T>>] {
|
||||
|
|
|
@ -327,7 +327,7 @@ mod test {
|
|||
vec![900..1000]
|
||||
);
|
||||
|
||||
// Splitted ranges.
|
||||
// Split ranges.
|
||||
assert_eq!(
|
||||
tracker.drain(5..1003).collect::<Vec<Range<u32>>>(),
|
||||
vec![5..21, 42..900, 1000..1003]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//!
|
||||
//! - **`api_log_info`** --- Log all API entry points at info instead of trace level.
|
||||
//! - **`resource_log_info`** --- Log resource lifecycle management at info instead of trace level.
|
||||
//! - **`link`** _(enabled by default)_ --- Use static linking for libraries. Disale to manually
|
||||
//! - **`link`** _(enabled by default)_ --- Use static linking for libraries. Disable to manually
|
||||
//! link. Enabled by default.
|
||||
//! - **`renderdoc`** --- Support the Renderdoc graphics debugger:
|
||||
//! [https://renderdoc.org/](https://renderdoc.org/)
|
||||
|
@ -58,7 +58,7 @@
|
|||
clippy::needless_lifetimes,
|
||||
// No need for defaults in the internal types.
|
||||
clippy::new_without_default,
|
||||
// Needless updates are more scaleable, easier to play with features.
|
||||
// Needless updates are more scalable, easier to play with features.
|
||||
clippy::needless_update,
|
||||
// Need many arguments for some core functions to be able to re-use code in many situations.
|
||||
clippy::too_many_arguments,
|
||||
|
|
|
@ -377,7 +377,7 @@ pub enum ColorStateError {
|
|||
FormatNotBlendable(wgt::TextureFormat),
|
||||
#[error("Format {0:?} does not have a color aspect")]
|
||||
FormatNotColor(wgt::TextureFormat),
|
||||
#[error("Sample count {0} is not supported by format {1:?} on this device. The WebGPU spec guarentees {2:?} samples are supported by this format. With the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature your device supports {3:?}.")]
|
||||
#[error("Sample count {0} is not supported by format {1:?} on this device. The WebGPU spec guarantees {2:?} samples are supported by this format. With the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature your device supports {3:?}.")]
|
||||
InvalidSampleCount(u32, wgt::TextureFormat, Vec<u32>, Vec<u32>),
|
||||
#[error("Output format {pipeline} is incompatible with the shader {shader}")]
|
||||
IncompatibleFormat {
|
||||
|
@ -399,7 +399,7 @@ pub enum DepthStencilStateError {
|
|||
FormatNotDepth(wgt::TextureFormat),
|
||||
#[error("Format {0:?} does not have a stencil aspect, but stencil test/write is enabled")]
|
||||
FormatNotStencil(wgt::TextureFormat),
|
||||
#[error("Sample count {0} is not supported by format {1:?} on this device. The WebGPU spec guarentees {2:?} samples are supported by this format. With the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature your device supports {3:?}.")]
|
||||
#[error("Sample count {0} is not supported by format {1:?} on this device. The WebGPU spec guarantees {2:?} samples are supported by this format. With the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature your device supports {3:?}.")]
|
||||
InvalidSampleCount(u32, wgt::TextureFormat, Vec<u32>, Vec<u32>),
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ impl<K: Clone + Eq + Hash, V> ResourcePool<K, V> {
|
|||
|
||||
drop(map_guard);
|
||||
|
||||
// Some other thread may beat us to initializing the entry, but OnceCell guarentees that only one thread
|
||||
// Some other thread may beat us to initializing the entry, but OnceCell guarantees that only one thread
|
||||
// will actually initialize the entry.
|
||||
//
|
||||
// We pass the strong reference outside of the closure to keep it alive while we're the only one keeping a reference to it.
|
||||
|
|
|
@ -3,8 +3,8 @@ use crate::device::trace;
|
|||
use crate::{
|
||||
binding_model::BindGroup,
|
||||
device::{
|
||||
queue, BufferMapPendingClosure, Device, DeviceError, HostMap, MissingDownlevelFlags,
|
||||
MissingFeatures,
|
||||
queue, resource::DeferredDestroy, BufferMapPendingClosure, Device, DeviceError, HostMap,
|
||||
MissingDownlevelFlags, MissingFeatures,
|
||||
},
|
||||
global::Global,
|
||||
hal_api::HalApi,
|
||||
|
@ -155,7 +155,7 @@ pub trait Resource: 'static + Sized + WasmNotSendSync {
|
|||
#[repr(C)]
|
||||
#[derive(Debug)]
|
||||
pub enum BufferMapAsyncStatus {
|
||||
/// The Buffer is sucessfully mapped, `get_mapped_range` can be called.
|
||||
/// The Buffer is successfully mapped, `get_mapped_range` can be called.
|
||||
///
|
||||
/// All other variants of this enum represent failures to map the buffer.
|
||||
Success,
|
||||
|
@ -604,29 +604,6 @@ impl<A: HalApi> Resource for Buffer<A> {
|
|||
}
|
||||
}
|
||||
|
||||
fn snatch_and_destroy_bind_groups<A: HalApi>(
|
||||
device: &Device<A>,
|
||||
bind_groups: &[Weak<BindGroup<A>>],
|
||||
) {
|
||||
for bind_group in bind_groups {
|
||||
if let Some(bind_group) = bind_group.upgrade() {
|
||||
if let Some(raw_bind_group) = bind_group.raw.snatch(device.snatchable_lock.write()) {
|
||||
resource_log!("Destroy raw BindGroup (destroyed) {:?}", bind_group.label());
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
if let Some(t) = device.trace.lock().as_mut() {
|
||||
t.add(trace::Action::DestroyBindGroup(bind_group.info.id()));
|
||||
}
|
||||
|
||||
unsafe {
|
||||
use hal::Device;
|
||||
device.raw().destroy_bind_group(raw_bind_group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A buffer that has been marked as destroyed and is staged for actual deletion soon.
|
||||
#[derive(Debug)]
|
||||
pub struct DestroyedBuffer<A: HalApi> {
|
||||
|
@ -650,7 +627,11 @@ impl<A: HalApi> DestroyedBuffer<A> {
|
|||
|
||||
impl<A: HalApi> Drop for DestroyedBuffer<A> {
|
||||
fn drop(&mut self) {
|
||||
snatch_and_destroy_bind_groups(&self.device, &self.bind_groups);
|
||||
let mut deferred = self.device.deferred_destroy.lock();
|
||||
for bind_group in self.bind_groups.drain(..) {
|
||||
deferred.push(DeferredDestroy::BindGroup(bind_group));
|
||||
}
|
||||
drop(deferred);
|
||||
|
||||
if let Some(raw) = self.raw.take() {
|
||||
resource_log!("Destroy raw Buffer (destroyed) {:?}", self.label());
|
||||
|
@ -1038,25 +1019,16 @@ impl<A: HalApi> DestroyedTexture<A> {
|
|||
impl<A: HalApi> Drop for DestroyedTexture<A> {
|
||||
fn drop(&mut self) {
|
||||
let device = &self.device;
|
||||
snatch_and_destroy_bind_groups(device, &self.bind_groups);
|
||||
|
||||
let mut deferred = device.deferred_destroy.lock();
|
||||
for view in self.views.drain(..) {
|
||||
if let Some(view) = view.upgrade() {
|
||||
if let Some(raw_view) = view.raw.snatch(device.snatchable_lock.write()) {
|
||||
resource_log!("Destroy raw TextureView (destroyed) {:?}", view.label());
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
if let Some(t) = self.device.trace.lock().as_mut() {
|
||||
t.add(trace::Action::DestroyTextureView(view.info.id()));
|
||||
}
|
||||
|
||||
unsafe {
|
||||
use hal::Device;
|
||||
self.device.raw().destroy_texture_view(raw_view);
|
||||
}
|
||||
}
|
||||
}
|
||||
deferred.push(DeferredDestroy::TextureView(view));
|
||||
}
|
||||
for bind_group in self.bind_groups.drain(..) {
|
||||
deferred.push(DeferredDestroy::BindGroup(bind_group));
|
||||
}
|
||||
drop(deferred);
|
||||
|
||||
if let Some(raw) = self.raw.take() {
|
||||
resource_log!("Destroy raw Texture (destroyed) {:?}", self.label());
|
||||
|
||||
|
@ -1155,7 +1127,7 @@ pub enum CreateTextureError {
|
|||
InvalidMultisampledStorageBinding,
|
||||
#[error("Format {0:?} does not support multisampling")]
|
||||
InvalidMultisampledFormat(wgt::TextureFormat),
|
||||
#[error("Sample count {0} is not supported by format {1:?} on this device. The WebGPU spec guarentees {2:?} samples are supported by this format. With the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature your device supports {3:?}.")]
|
||||
#[error("Sample count {0} is not supported by format {1:?} on this device. The WebGPU spec guarantees {2:?} samples are supported by this format. With the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature your device supports {3:?}.")]
|
||||
InvalidSampleCount(u32, wgt::TextureFormat, Vec<u32>, Vec<u32>),
|
||||
#[error("Multisampled textures must have RENDER_ATTACHMENT usage")]
|
||||
MultisampledNotRenderAttachment,
|
||||
|
|
|
@ -12,7 +12,7 @@ pub struct ExclusiveSnatchGuard<'a>(RwLockWriteGuard<'a, ()>);
|
|||
/// it early.
|
||||
///
|
||||
/// In order to safely access the underlying data, the device's global snatchable
|
||||
/// lock must be taken. To guarentee it, methods take a read or write guard of that
|
||||
/// lock must be taken. To guarantee it, methods take a read or write guard of that
|
||||
/// special lock.
|
||||
pub struct Snatchable<T> {
|
||||
value: UnsafeCell<Option<T>>,
|
||||
|
@ -68,7 +68,7 @@ impl SnatchLock {
|
|||
/// The safety of `Snatchable::get` and `Snatchable::snatch` rely on their using of the
|
||||
/// right SnatchLock (the one associated to the same device). This method is unsafe
|
||||
/// to force force sers to think twice about creating a SnatchLock. The only place this
|
||||
/// method sould be called is when creating the device.
|
||||
/// method should be called is when creating the device.
|
||||
pub unsafe fn new() -> Self {
|
||||
SnatchLock {
|
||||
lock: RwLock::new(()),
|
||||
|
|
|
@ -165,7 +165,7 @@ where
|
|||
}
|
||||
|
||||
pub(crate) fn insert_error(&mut self, id: Id<T::Marker>, label: &str) {
|
||||
log::trace!("User is insering as error {}{:?}", T::TYPE, id);
|
||||
log::trace!("User is inserting as error {}{:?}", T::TYPE, id);
|
||||
let (index, epoch, _) = id.unzip();
|
||||
self.insert_impl(
|
||||
index as usize,
|
||||
|
|
|
@ -60,7 +60,7 @@ impl<A: HalApi> BufferBindGroupState<A> {
|
|||
/// Optimize the buffer bind group state by sorting it by ID.
|
||||
///
|
||||
/// When this list of states is merged into a tracker, the memory
|
||||
/// accesses will be in a constant assending order.
|
||||
/// accesses will be in a constant ascending order.
|
||||
#[allow(clippy::pattern_type_mismatch)]
|
||||
pub(crate) fn optimize(&self) {
|
||||
let mut buffers = self.buffers.lock();
|
||||
|
|
|
@ -205,7 +205,7 @@ fn invalid_resource_state<T: ResourceUses>(state: T) -> bool {
|
|||
/// a barrier.
|
||||
fn skip_barrier<T: ResourceUses>(old_state: T, new_state: T) -> bool {
|
||||
// If the state didn't change and all the usages are ordered, the hardware
|
||||
// will guarentee the order of accesses, so we do not need to issue a barrier at all
|
||||
// will guarantee the order of accesses, so we do not need to issue a barrier at all
|
||||
old_state == new_state && old_state.all_ordered()
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ impl<T: ResourceUses> fmt::Display for InvalidUse<T> {
|
|||
/// and may include conflicting uses. This is fully compliant by the WebGPU spec.
|
||||
///
|
||||
/// All bind group states are sorted by their ID so that when adding to a tracker,
|
||||
/// they are added in the most efficient order possible (assending order).
|
||||
/// they are added in the most efficient order possible (ascending order).
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct BindGroupStates<A: HalApi> {
|
||||
pub buffers: BufferBindGroupState<A>,
|
||||
|
@ -335,7 +335,7 @@ impl<A: HalApi> BindGroupStates<A> {
|
|||
/// Optimize the bind group states by sorting them by ID.
|
||||
///
|
||||
/// When this list of states is merged into a tracker, the memory
|
||||
/// accesses will be in a constant assending order.
|
||||
/// accesses will be in a constant ascending order.
|
||||
pub fn optimize(&mut self) {
|
||||
self.buffers.optimize();
|
||||
self.textures.optimize();
|
||||
|
|
|
@ -31,7 +31,7 @@ impl<T: Resource> StatelessBindGroupSate<T> {
|
|||
/// Optimize the buffer bind group state by sorting it by ID.
|
||||
///
|
||||
/// When this list of states is merged into a tracker, the memory
|
||||
/// accesses will be in a constant assending order.
|
||||
/// accesses will be in a constant ascending order.
|
||||
pub(crate) fn optimize(&self) {
|
||||
let mut resources = self.resources.lock();
|
||||
resources.sort_unstable_by_key(|&(id, _)| id.unzip().0);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*! Texture Trackers
|
||||
*
|
||||
* Texture trackers are signifigantly more complicated than
|
||||
* Texture trackers are significantly more complicated than
|
||||
* the buffer trackers because textures can be in a "complex"
|
||||
* state where each individual subresource can potentially be
|
||||
* in a different state from every other subtresource. These
|
||||
* complex states are stored seperately from the simple states
|
||||
* complex states are stored separately from the simple states
|
||||
* because they are signifignatly more difficult to track and
|
||||
* most resources spend the vast majority of their lives in
|
||||
* simple states.
|
||||
|
@ -170,7 +170,7 @@ impl<A: HalApi> TextureBindGroupState<A> {
|
|||
/// Optimize the texture bind group state by sorting it by ID.
|
||||
///
|
||||
/// When this list of states is merged into a tracker, the memory
|
||||
/// accesses will be in a constant assending order.
|
||||
/// accesses will be in a constant ascending order.
|
||||
pub(crate) fn optimize(&self) {
|
||||
let mut textures = self.textures.lock();
|
||||
textures.sort_unstable_by_key(|v| v.texture.as_info().id().unzip().0);
|
||||
|
@ -1026,7 +1026,7 @@ unsafe fn insert<A: HalApi>(
|
|||
|
||||
log::trace!("\ttex {index}: insert end {state:?}");
|
||||
|
||||
// We only need to insert into the end, as there is guarenteed to be
|
||||
// We only need to insert into the end, as there is guaranteed to be
|
||||
// a start state provider.
|
||||
unsafe { *end_state.simple.get_unchecked_mut(index) = state };
|
||||
}
|
||||
|
@ -1039,7 +1039,7 @@ unsafe fn insert<A: HalApi>(
|
|||
|
||||
log::trace!("\ttex {index}: insert end {complex:?}");
|
||||
|
||||
// We only need to insert into the end, as there is guarenteed to be
|
||||
// We only need to insert into the end, as there is guaranteed to be
|
||||
// a start state provider.
|
||||
unsafe { *end_state.simple.get_unchecked_mut(index) = TextureUses::COMPLEX };
|
||||
end_state.complex.insert(index, complex);
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -10,12 +10,12 @@ use winapi::{
|
|||
// lock everyone out until we have registered or unregistered the
|
||||
// exception handler, otherwise really nasty races could happen.
|
||||
//
|
||||
// By routing all the registration through these functions we can guarentee
|
||||
// By routing all the registration through these functions we can guarantee
|
||||
// there is either 1 or 0 exception handlers registered, not multiple.
|
||||
static EXCEPTION_HANLDER_COUNT: Mutex<usize> = Mutex::const_new(parking_lot::RawMutex::INIT, 0);
|
||||
static EXCEPTION_HANDLER_COUNT: Mutex<usize> = Mutex::const_new(parking_lot::RawMutex::INIT, 0);
|
||||
|
||||
pub fn register_exception_handler() {
|
||||
let mut count_guard = EXCEPTION_HANLDER_COUNT.lock();
|
||||
let mut count_guard = EXCEPTION_HANDLER_COUNT.lock();
|
||||
if *count_guard == 0 {
|
||||
unsafe {
|
||||
errhandlingapi::AddVectoredExceptionHandler(0, Some(output_debug_string_handler))
|
||||
|
@ -25,7 +25,7 @@ pub fn register_exception_handler() {
|
|||
}
|
||||
|
||||
pub fn unregister_exception_handler() {
|
||||
let mut count_guard = EXCEPTION_HANLDER_COUNT.lock();
|
||||
let mut count_guard = EXCEPTION_HANDLER_COUNT.lock();
|
||||
if *count_guard == 1 {
|
||||
unsafe {
|
||||
errhandlingapi::RemoveVectoredExceptionHandler(output_debug_string_handler as *mut _)
|
||||
|
|
|
@ -57,7 +57,7 @@ pub fn enumerate_adapters(factory: d3d12::DxgiFactory) -> Vec<d3d12::DxgiAdapter
|
|||
for cur_index in 0.. {
|
||||
if let Some(factory6) = factory.as_factory6() {
|
||||
profiling::scope!("IDXGIFactory6::EnumAdapterByGpuPreference");
|
||||
// We're already at dxgi1.6, we can grab IDXGIAdapater4 directly
|
||||
// We're already at dxgi1.6, we can grab IDXGIAdapter4 directly
|
||||
let mut adapter4 = d3d12::ComPtr::<dxgi1_6::IDXGIAdapter4>::null();
|
||||
let hr = unsafe {
|
||||
factory6.EnumAdapterByGpuPreference(
|
||||
|
@ -100,7 +100,7 @@ pub fn enumerate_adapters(factory: d3d12::DxgiFactory) -> Vec<d3d12::DxgiAdapter
|
|||
continue;
|
||||
}
|
||||
|
||||
// Do the most aggressive casts first, skipping Adpater4 as we definitely don't have dxgi1_6.
|
||||
// Do the most aggressive casts first, skipping Adapter4 as we definitely don't have dxgi1_6.
|
||||
|
||||
// Adapter1 -> Adapter3
|
||||
unsafe {
|
||||
|
|
|
@ -189,7 +189,7 @@ pub(super) struct CpuPool {
|
|||
device: d3d12::Device,
|
||||
ty: d3d12::DescriptorHeapType,
|
||||
heaps: Vec<FixedSizeHeap>,
|
||||
avaliable_heap_indices: BitSet,
|
||||
available_heap_indices: BitSet,
|
||||
}
|
||||
|
||||
impl CpuPool {
|
||||
|
@ -198,13 +198,13 @@ impl CpuPool {
|
|||
device,
|
||||
ty,
|
||||
heaps: Vec::new(),
|
||||
avaliable_heap_indices: BitSet::new(),
|
||||
available_heap_indices: BitSet::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn alloc_handle(&mut self) -> Result<Handle, crate::DeviceError> {
|
||||
let heap_index = self
|
||||
.avaliable_heap_indices
|
||||
.available_heap_indices
|
||||
.iter()
|
||||
.next()
|
||||
.unwrap_or(self.heaps.len());
|
||||
|
@ -212,7 +212,7 @@ impl CpuPool {
|
|||
// Allocate a new heap
|
||||
if heap_index == self.heaps.len() {
|
||||
self.heaps.push(FixedSizeHeap::new(&self.device, self.ty)?);
|
||||
self.avaliable_heap_indices.insert(heap_index);
|
||||
self.available_heap_indices.insert(heap_index);
|
||||
}
|
||||
|
||||
let heap = &mut self.heaps[heap_index];
|
||||
|
@ -221,7 +221,7 @@ impl CpuPool {
|
|||
heap_index,
|
||||
};
|
||||
if heap.is_full() {
|
||||
self.avaliable_heap_indices.remove(heap_index);
|
||||
self.available_heap_indices.remove(heap_index);
|
||||
}
|
||||
|
||||
Ok(handle)
|
||||
|
@ -229,7 +229,7 @@ impl CpuPool {
|
|||
|
||||
pub(super) fn free_handle(&mut self, handle: Handle) {
|
||||
self.heaps[handle.heap_index].free_handle(handle.raw);
|
||||
self.avaliable_heap_indices.insert(handle.heap_index);
|
||||
self.available_heap_indices.insert(handle.heap_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ impl crate::Device<super::Api> for super::Device {
|
|||
// (bind group [2]) - Space=0
|
||||
// Special constant buffer: Space=0
|
||||
|
||||
//TODO: put lower bind group indices futher down the root signature. See:
|
||||
//TODO: put lower bind group indices further down the root signature. See:
|
||||
// https://microsoft.github.io/DirectX-Specs/d3d/ResourceBinding.html#binding-model
|
||||
// Currently impossible because wgpu-core only re-binds the descriptor sets based
|
||||
// on Vulkan-like layout compatibility rules.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
# DirectX12 API internals.
|
||||
|
||||
Generally the mapping is straightforwad.
|
||||
Generally the mapping is straightforward.
|
||||
|
||||
## Resource transitions
|
||||
|
||||
|
|
|
@ -776,7 +776,7 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
|
|||
) {
|
||||
// There is nothing preventing the user from trying to update a single value within
|
||||
// a vector or matrix in the set_push_constant call, as to the user, all of this is
|
||||
// just memory. However OpenGL does not allow parital uniform updates.
|
||||
// just memory. However OpenGL does not allow partial uniform updates.
|
||||
//
|
||||
// As such, we locally keep a copy of the current state of the push constant memory
|
||||
// block. If the user tries to update a single value, we have the data to update the entirety
|
||||
|
|
|
@ -215,7 +215,7 @@ bitflags::bitflags! {
|
|||
// (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4972/diffs?diff_id=75888#22f5d1004713c9bbf857988c7efb81631ab88f99_323_327)
|
||||
// seems to indicate all skylake models are effected.
|
||||
const MESA_I915_SRGB_SHADER_CLEAR = 1 << 0;
|
||||
/// Buffer map must emulated becuase it is not supported natively
|
||||
/// Buffer map must emulated because it is not supported natively
|
||||
const EMULATE_BUFFER_MAP = 1 << 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ fn load_gl_func(name: &str, module: Option<HMODULE>) -> *const c_void {
|
|||
ptr.cast()
|
||||
}
|
||||
|
||||
fn extensions(extra: &Wgl, dc: HDC) -> HashSet<String> {
|
||||
fn get_extensions(extra: &Wgl, dc: HDC) -> HashSet<String> {
|
||||
if extra.GetExtensionsStringARB.is_loaded() {
|
||||
unsafe { CStr::from_ptr(extra.GetExtensionsStringARB(dc as *const _)) }
|
||||
.to_str()
|
||||
|
@ -449,9 +449,9 @@ impl crate::Instance<super::Api> for Instance {
|
|||
})?;
|
||||
|
||||
let extra = Wgl::load_with(|name| load_gl_func(name, None));
|
||||
let extentions = extensions(&extra, dc);
|
||||
let extensions = get_extensions(&extra, dc);
|
||||
|
||||
let can_use_profile = extentions.contains("WGL_ARB_create_context_profile")
|
||||
let can_use_profile = extensions.contains("WGL_ARB_create_context_profile")
|
||||
&& extra.CreateContextAttribsARB.is_loaded();
|
||||
|
||||
let context = if can_use_profile {
|
||||
|
@ -494,10 +494,10 @@ impl crate::Instance<super::Api> for Instance {
|
|||
};
|
||||
|
||||
let extra = Wgl::load_with(|name| load_gl_func(name, None));
|
||||
let extentions = extensions(&extra, dc);
|
||||
let extensions = get_extensions(&extra, dc);
|
||||
|
||||
let srgb_capable = extentions.contains("WGL_EXT_framebuffer_sRGB")
|
||||
|| extentions.contains("WGL_ARB_framebuffer_sRGB")
|
||||
let srgb_capable = extensions.contains("WGL_EXT_framebuffer_sRGB")
|
||||
|| extensions.contains("WGL_ARB_framebuffer_sRGB")
|
||||
|| gl
|
||||
.supported_extensions()
|
||||
.contains("GL_ARB_framebuffer_sRGB");
|
||||
|
@ -742,8 +742,8 @@ impl crate::Surface<super::Api> for Surface {
|
|||
|
||||
// Setup presentation mode
|
||||
let extra = Wgl::load_with(|name| load_gl_func(name, None));
|
||||
let extentions = extensions(&extra, dc.device);
|
||||
if !(extentions.contains("WGL_EXT_swap_control") && extra.SwapIntervalEXT.is_loaded()) {
|
||||
let extensions = get_extensions(&extra, dc.device);
|
||||
if !(extensions.contains("WGL_EXT_swap_control") && extra.SwapIntervalEXT.is_loaded()) {
|
||||
log::error!("WGL_EXT_swap_control is unsupported");
|
||||
return Err(crate::SurfaceError::Other(
|
||||
"WGL_EXT_swap_control is unsupported",
|
||||
|
|
|
@ -412,7 +412,7 @@ pub trait Queue<A: Api>: WasmNotSendSync {
|
|||
/// Valid usage:
|
||||
/// - all of the command buffers were created from command pools
|
||||
/// that are associated with this queue.
|
||||
/// - all of the command buffers had `CommadBuffer::finish()` called.
|
||||
/// - all of the command buffers had `CommandBuffer::finish()` called.
|
||||
/// - all surface textures that the command buffers write to must be
|
||||
/// passed to the surface_textures argument.
|
||||
unsafe fn submit(
|
||||
|
@ -512,7 +512,7 @@ pub trait CommandEncoder<A: Api>: WasmNotSendSync + fmt::Debug {
|
|||
// pass common
|
||||
|
||||
/// Sets the bind group at `index` to `group`, assuming the layout
|
||||
/// of all the preceeding groups to be taken from `layout`.
|
||||
/// of all the preceding groups to be taken from `layout`.
|
||||
unsafe fn set_bind_group(
|
||||
&mut self,
|
||||
layout: &A::PipelineLayout,
|
||||
|
@ -1465,7 +1465,7 @@ impl ValidationCanary {
|
|||
self.inner.lock().push(msg);
|
||||
}
|
||||
|
||||
/// Returns any API validation errors that hav occurred in this process
|
||||
/// Returns any API validation errors that have occurred in this process
|
||||
/// since the last call to this function.
|
||||
pub fn get_and_reset(&self) -> Vec<String> {
|
||||
self.inner.lock().drain(..).collect()
|
||||
|
|
|
@ -538,7 +538,7 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
|
|||
.geometry(vk::AccelerationStructureGeometryDataKHR {
|
||||
triangles: *triangle_data,
|
||||
})
|
||||
.flags(conv::map_acceleration_structure_geomety_flags(
|
||||
.flags(conv::map_acceleration_structure_geometry_flags(
|
||||
triangles.flags,
|
||||
));
|
||||
|
||||
|
@ -570,7 +570,7 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
|
|||
.geometry(vk::AccelerationStructureGeometryDataKHR {
|
||||
aabbs: *aabbs_data,
|
||||
})
|
||||
.flags(conv::map_acceleration_structure_geomety_flags(aabb.flags));
|
||||
.flags(conv::map_acceleration_structure_geometry_flags(aabb.flags));
|
||||
|
||||
geometries.push(*geometry);
|
||||
ranges.push(*range);
|
||||
|
|
|
@ -924,7 +924,7 @@ pub fn map_acceleration_structure_flags(
|
|||
vk_flags
|
||||
}
|
||||
|
||||
pub fn map_acceleration_structure_geomety_flags(
|
||||
pub fn map_acceleration_structure_geometry_flags(
|
||||
flags: crate::AccelerationStructureGeometryFlags,
|
||||
) -> vk::GeometryFlagsKHR {
|
||||
let mut vk_flags = vk::GeometryFlagsKHR::empty();
|
||||
|
|
|
@ -2149,7 +2149,7 @@ impl crate::Device<super::Api> for super::Device {
|
|||
.geometry(vk::AccelerationStructureGeometryDataKHR {
|
||||
triangles: *triangle_data,
|
||||
})
|
||||
.flags(conv::map_acceleration_structure_geomety_flags(
|
||||
.flags(conv::map_acceleration_structure_geometry_flags(
|
||||
triangles.flags,
|
||||
));
|
||||
|
||||
|
@ -2171,7 +2171,7 @@ impl crate::Device<super::Api> for super::Device {
|
|||
let geometry = vk::AccelerationStructureGeometryKHR::builder()
|
||||
.geometry_type(vk::GeometryTypeKHR::AABBS)
|
||||
.geometry(vk::AccelerationStructureGeometryDataKHR { aabbs: *aabbs_data })
|
||||
.flags(conv::map_acceleration_structure_geomety_flags(aabb.flags));
|
||||
.flags(conv::map_acceleration_structure_geometry_flags(aabb.flags));
|
||||
|
||||
geometries.push(*geometry);
|
||||
primitive_counts.push(aabb.count);
|
||||
|
|
|
@ -53,7 +53,7 @@ unsafe extern "system" fn debug_utils_messenger_callback(
|
|||
// Silence Vulkan Validation error "VUID-VkRenderPassBeginInfo-framebuffer-04627"
|
||||
// if the OBS layer is enabled. This is a bug in the OBS layer. As the OBS layer
|
||||
// does not have a version number they increment, there is no way to qualify the
|
||||
// supression of the error to a specific version of the OBS layer.
|
||||
// suppression of the error to a specific version of the OBS layer.
|
||||
//
|
||||
// See https://github.com/obsproject/obs-studio/issues/9353
|
||||
const VUID_VKRENDERPASSBEGININFO_FRAMEBUFFER_04627: i32 = 0x45125641;
|
||||
|
@ -279,7 +279,7 @@ impl super::Instance {
|
|||
}
|
||||
|
||||
// VK_EXT_swapchain_colorspace
|
||||
// Provid wide color gamut
|
||||
// Provides wide color gamut
|
||||
extensions.push(vk::ExtSwapchainColorspaceFn::name());
|
||||
|
||||
// VK_KHR_get_physical_device_properties2
|
||||
|
@ -968,7 +968,7 @@ impl crate::Surface<super::Api> for super::Surface {
|
|||
sc.next_surface_index += 1;
|
||||
sc.next_surface_index %= sc.surface_semaphores.len();
|
||||
|
||||
// special case for Intel Vulkan returning bizzare values (ugh)
|
||||
// special case for Intel Vulkan returning bizarre values (ugh)
|
||||
if sc.device.vendor_id == crate::auxil::db::intel::VENDOR && index > 0x100 {
|
||||
return Err(crate::SurfaceError::Outdated);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.toml":"6b0d7ddecc26e3b72cb6d47793770203147f851f048da8d1f5d8f508e40d4f82","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","src/assertions.rs":"3fe98027aa73970c8ab7874a3e13dbfd6faa87df2081beb5c83aeec4c60f372f","src/lib.rs":"02c0e2b0a2e60005144b33bc4968b23a37d7c2454a1284ff5c9c9cdca4082ebb","src/math.rs":"4d03039736dd6926feb139bc68734cb59df34ede310427bbf059e5c925e0af3b"},"package":null}
|
||||
{"files":{"Cargo.toml":"6b0d7ddecc26e3b72cb6d47793770203147f851f048da8d1f5d8f508e40d4f82","LICENSE.APACHE":"a6cba85bc92e0cff7a450b1d873c0eaa2e9fc96bf472df0247a26bec77bf3ff9","LICENSE.MIT":"c7fea58d1cfe49634cd92e54fc10a9d871f4b275321a4cd8c09e449122caaeb4","src/assertions.rs":"3fe98027aa73970c8ab7874a3e13dbfd6faa87df2081beb5c83aeec4c60f372f","src/lib.rs":"33e1cf343a848c5deecbac6949d5a1378a70da0a48b2120fc62d600ce98a2da2","src/math.rs":"4d03039736dd6926feb139bc68734cb59df34ede310427bbf059e5c925e0af3b"},"package":null}
|
|
@ -1553,7 +1553,7 @@ bitflags::bitflags! {
|
|||
/// If this is false, calls to `CommandEncoder::resolve_query_set` will be performed on the device (i.e. cpu) timeline
|
||||
/// and will block that timeline until the query has data. You may work around this limitation by waiting until the submit
|
||||
/// whose queries you are resolving is fully finished (through use of `queue.on_submitted_work_done`) and only
|
||||
/// then submitting the resolve_query_set command. The queries will be guarenteed finished, so will not block.
|
||||
/// then submitting the resolve_query_set command. The queries will be guaranteed finished, so will not block.
|
||||
///
|
||||
/// Supported by:
|
||||
/// - Vulkan,
|
||||
|
@ -6403,7 +6403,7 @@ impl<T> ImageCopyTexture<T> {
|
|||
}
|
||||
}
|
||||
|
||||
/// View of an external texture that cna be used to copy to a texture.
|
||||
/// View of an external texture that can be used to copy to a texture.
|
||||
///
|
||||
/// Corresponds to [WebGPU `GPUImageCopyExternalImage`](
|
||||
/// https://gpuweb.github.io/gpuweb/#dictdef-gpuimagecopyexternalimage).
|
||||
|
@ -6441,7 +6441,7 @@ pub enum ExternalImageSource {
|
|||
HTMLCanvasElement(web_sys::HtmlCanvasElement),
|
||||
/// Copy from a off-screen canvas.
|
||||
///
|
||||
/// Requies [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`]
|
||||
/// Requires [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`]
|
||||
OffscreenCanvas(web_sys::OffscreenCanvas),
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче