mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
Release v0.10 (#1820)
* Release v0.10 * hal/gles: update glow handles logic
This commit is contained in:
parent
80ec65e892
commit
9da5c1d3a0
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -148,7 +148,7 @@ jobs:
|
||||
cargo run --target ${{ matrix.target }} --bin wgpu-info
|
||||
|
||||
# run player tests
|
||||
cargo test --target ${{ matrix.target }} --workspace --exclude wpgu --no-fail-fast -- --nocapture
|
||||
cargo test --target ${{ matrix.target }} --workspace --exclude wgpu --no-fail-fast -- --nocapture
|
||||
|
||||
# run coretests
|
||||
cargo run --target ${{ matrix.target }} --bin wgpu-info -- cargo test --target ${{ matrix.target }} -p wgpu --no-fail-fast -- --nocapture --test-threads=1 # GLES is currently non-multithreadable
|
||||
|
22
CHANGELOG.md
22
CHANGELOG.md
@ -1,8 +1,9 @@
|
||||
# Change Log
|
||||
|
||||
## Unreleased
|
||||
## v0.10 (2021-08-18)
|
||||
- Infrastructure:
|
||||
- `gfx-hal` is replaced by the in-house graphics abstraction `wgpu-hal`. Backends: Vulkan, Metal, OpenGL ES-3.
|
||||
- `gfx-hal` is replaced by the in-house graphics abstraction `wgpu-hal`. Backends: Vulkan, Metal, D3D-12, and OpenGL ES-3.
|
||||
- examples are tested automatically for image snapshots.
|
||||
- API:
|
||||
- `cross` feature is removed entirely. Only Rust code from now on.
|
||||
- processing SPIR-V inputs for later translation now requires `spirv` compile feature enabled
|
||||
@ -10,11 +11,24 @@
|
||||
- several bitflag names are renamed to plural: `TextureUsage`, `BufferUsage`, `ColorWrite`.
|
||||
- the `SwapChain` is merged into `Surface`. Returned frames are `Texture` instead of `TextureView`.
|
||||
- renamed `TextureUsage` bits: `SAMPLED` -> `TEXTURE_BINDING`, `STORAGE` -> `STORAGE_BINDING`.
|
||||
- renamed `InputStepMode` to `VertexStepMode`
|
||||
- Implemented `Rgb9e5Ufloat` format.
|
||||
- renamed `InputStepMode` to `VertexStepMode`.
|
||||
- readable storage textures are no longer a part of the base API. Only exposed via format-specific features, non-portably.
|
||||
- implemented `Rgb9e5Ufloat` format.
|
||||
- added limits for binding sizes, vertex data, per-stage bindings, and others.
|
||||
- reworked downlevel flags, added downlevel limits.
|
||||
- `resolver = "2"` is now required in top-level cargo manifests
|
||||
- Fixed:
|
||||
- `Device::create_query_set` would return an error when creating exactly `QUERY_SET_MAX_QUERIES` (8192) queries. Now it only returns an error when trying to create *more* than `QUERY_SET_MAX_QUERIES` queries.
|
||||
|
||||
## wgpu-core-0.9.2
|
||||
- fix `Features::TEXTURE_SPECIFIC_FORMAT_FEATURES` not being supported for rendertargets
|
||||
|
||||
## wgpu-core-0.9.1 (2021-07-13)
|
||||
- fix buffer inits delayed by a frame
|
||||
- fix query resolves to initialize buffers
|
||||
- fix pipeline statistics stride
|
||||
- fix the check for maximum query count
|
||||
|
||||
## v0.9 (2021-06-18)
|
||||
- Updated:
|
||||
- naga to `v0.5`.
|
||||
|
50
Cargo.lock
generated
50
Cargo.lock
generated
@ -62,9 +62,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ash"
|
||||
version = "0.32.1"
|
||||
version = "0.33.0+1.2.186"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06063a002a77d2734631db74e8f4ce7148b77fe522e6bca46f2ae7774fd48112"
|
||||
checksum = "a2142f1fa77cc4d24ffd2f24dc84f88ce5b1e588d524f10fb473a04b93aef14f"
|
||||
dependencies = [
|
||||
"libloading 0.7.0",
|
||||
]
|
||||
@ -458,8 +458,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "d3d12"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/gfx-rs/d3d12-rs?rev=79f29c8#79f29c8809d3dc4f97785815567e5efda20e639a"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2daefd788d1e96e0a9d66dee4b828b883509bc3ea9ce30665f04c3246372690c"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libloading 0.7.0",
|
||||
@ -679,8 +680,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "glow"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/grovesNL/glow?rev=0864897a28bbdd43f89f4fd8fdd4ed781b719f8a#0864897a28bbdd43f89f4fd8fdd4ed781b719f8a"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f04649123493bc2483cbef4daddb45d40bbdae5adb221a63a23efdb0cc99520"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"slotmap",
|
||||
@ -690,9 +692,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpu-alloc"
|
||||
version = "0.4.7"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cbc1b6ca374e81862526786d9cb42357ce03706ed1b8761730caafd02ab91f3a"
|
||||
checksum = "c481459c44304a1dfed23bd650bb3912e12c9f77d7871f86d7ed7c9730a52e79"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"gpu-alloc-types",
|
||||
@ -709,9 +711,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gpu-descriptor"
|
||||
version = "0.1.1"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8a70f1e87a3840ed6a3e99e02c2b861e4dbdf26f0d07e38f42ea5aff46cfce2"
|
||||
checksum = "d7a237f0419ab10d17006d55c62ac4f689a6bf52c75d3f38b8361d249e8d4b0b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"gpu-descriptor-types",
|
||||
@ -907,8 +909,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "metal"
|
||||
version = "0.22.0"
|
||||
source = "git+https://github.com/gfx-rs/metal-rs?rev=08cc15a3be5a57fc07bb27091eff3569dd60cfd3#08cc15a3be5a57fc07bb27091eff3569dd60cfd3"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79d7d769f1c104b8388294d6594d491d2e21240636f5f94d37f8a0f3d7904450"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"block",
|
||||
@ -963,8 +966,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/gfx-rs/naga?rev=4e181d6#4e181d6af4b758c11482b633b3a54b58bfbd4a59"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c70938c43114c164e8ef86e608b39e68d3e4c8bca25e105bf4a3e788042a804a"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"bitflags",
|
||||
@ -975,7 +979,7 @@ dependencies = [
|
||||
"petgraph",
|
||||
"rose_tree",
|
||||
"serde",
|
||||
"spirv_headers",
|
||||
"spirv",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
@ -1506,10 +1510,10 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv_headers"
|
||||
version = "1.5.0"
|
||||
name = "spirv"
|
||||
version = "0.2.0+1.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f5b132530b1ac069df335577e3581765995cba5a13995cdbbdbc8fb057c532c"
|
||||
checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"num-traits 0.2.14",
|
||||
@ -1768,7 +1772,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wgpu"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"async-executor",
|
||||
@ -1802,7 +1806,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
@ -1824,7 +1828,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-hal"
|
||||
version = "0.9.0"
|
||||
version = "0.10.1"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"ash",
|
||||
@ -1858,7 +1862,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-info"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"wgpu",
|
||||
@ -1866,7 +1870,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wgpu-types"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"serde",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "wgpu-core"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
authors = ["wgpu developers"]
|
||||
edition = "2018"
|
||||
description = "WebGPU core logic on gfx-hal"
|
||||
@ -35,29 +35,30 @@ smallvec = "1"
|
||||
thiserror = "1"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "4e181d6"
|
||||
#git = "https://github.com/gfx-rs/naga"
|
||||
#rev = "4e181d6"
|
||||
version = "0.6"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[dependencies.wgt]
|
||||
path = "../wgpu-types"
|
||||
package = "wgpu-types"
|
||||
version = "0.9"
|
||||
version = "0.10"
|
||||
|
||||
[dependencies.hal]
|
||||
path = "../wgpu-hal"
|
||||
package = "wgpu-hal"
|
||||
version = "0.9"
|
||||
version = "0.10.1"
|
||||
|
||||
[target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies]
|
||||
hal = { path = "../wgpu-hal", package = "wgpu-hal", features = ["metal"] }
|
||||
hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.10", features = ["metal"] }
|
||||
#Note: could also enable "vulkan" for Vulkan Portability
|
||||
|
||||
[target.'cfg(all(not(target_arch = "wasm32"), unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
|
||||
hal = { path = "../wgpu-hal", package = "wgpu-hal", features = ["vulkan", "gles", "renderdoc"] }
|
||||
hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.10", features = ["vulkan", "gles", "renderdoc"] }
|
||||
|
||||
[target.'cfg(all(not(target_arch = "wasm32"), windows))'.dependencies]
|
||||
hal = { path = "../wgpu-hal", package = "wgpu-hal", features = ["vulkan", "dx12", "renderdoc"] }
|
||||
hal = { path = "../wgpu-hal", package = "wgpu-hal", version = "0.10", features = ["vulkan", "dx12", "renderdoc"] }
|
||||
|
||||
[build-dependencies]
|
||||
cfg_aliases = "0.1"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "wgpu-hal"
|
||||
version = "0.9.0"
|
||||
version = "0.10.1"
|
||||
authors = ["wgpu developers"]
|
||||
edition = "2018"
|
||||
description = "WebGPU hardware abstraction layer"
|
||||
@ -24,7 +24,6 @@ bitflags = "1.0"
|
||||
parking_lot = "0.11"
|
||||
raw-window-handle = "0.3"
|
||||
thiserror = "1"
|
||||
wgt = { package = "wgpu-types", path = "../wgpu-types" }
|
||||
|
||||
# backends common
|
||||
arrayvec = "0.7"
|
||||
@ -37,18 +36,23 @@ block = { version = "0.1", optional = true }
|
||||
foreign-types = { version = "0.3", optional = true }
|
||||
|
||||
# backend: Vulkan
|
||||
ash = { version = "0.32", optional = true }
|
||||
gpu-alloc = { version = "0.4", optional = true }
|
||||
gpu-descriptor = { version = "0.1", optional = true }
|
||||
ash = { version = "0.33", optional = true }
|
||||
gpu-alloc = { version = "0.5", optional = true }
|
||||
gpu-descriptor = { version = "0.2", optional = true }
|
||||
inplace_it = { version ="0.3.3", optional = true }
|
||||
|
||||
# backend: Gles
|
||||
glow = { git = "https://github.com/grovesNL/glow", rev = "0864897a28bbdd43f89f4fd8fdd4ed781b719f8a", optional = true }
|
||||
glow = { version = "0.11", optional = true }
|
||||
|
||||
# backend: Dx12
|
||||
bit-set = { version = "0.5", optional = true }
|
||||
range-alloc = { version = "0.1", optional = true }
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
path = "../wgpu-types"
|
||||
version = "0.10"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
egl = { package = "khronos-egl", version = "4.1", features = ["dynamic"], optional = true }
|
||||
#Note: it's only unused on Apple platforms
|
||||
@ -56,20 +60,22 @@ libloading = { version = "0.7", optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = { version = "0.3", features = ["libloaderapi", "windef", "winuser"] }
|
||||
native = { package = "d3d12", git = "https://github.com/gfx-rs/d3d12-rs", rev = "79f29c8", features = ["libloading"], optional = true }
|
||||
native = { package = "d3d12", version = "0.4.1", features = ["libloading"], optional = true }
|
||||
|
||||
[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
|
||||
mtl = { package = "metal", version = "0.22", git="https://github.com/gfx-rs/metal-rs", rev="08cc15a3be5a57fc07bb27091eff3569dd60cfd3" }
|
||||
mtl = { package = "metal", version = "0.23" }
|
||||
objc = "0.2.5"
|
||||
core-graphics-types = "0.1"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "4e181d6"
|
||||
#git = "https://github.com/gfx-rs/naga"
|
||||
#rev = "4e181d6"
|
||||
version = "0.6"
|
||||
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "4e181d6"
|
||||
#git = "https://github.com/gfx-rs/naga"
|
||||
#rev = "4e181d6"
|
||||
version = "0.6"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -14,7 +14,8 @@ pub(super) struct State {
|
||||
primitive: super::PrimitiveState,
|
||||
index_format: wgt::IndexFormat,
|
||||
index_offset: wgt::BufferAddress,
|
||||
vertex_buffers: [(super::VertexBufferDesc, super::BufferBinding); crate::MAX_VERTEX_BUFFERS],
|
||||
vertex_buffers:
|
||||
[(super::VertexBufferDesc, Option<super::BufferBinding>); crate::MAX_VERTEX_BUFFERS],
|
||||
vertex_attributes: ArrayVec<super::AttributeDesc, { super::MAX_VERTEX_ATTRIBUTES }>,
|
||||
color_targets: ArrayVec<super::ColorTargetDesc, { crate::MAX_COLOR_TARGETS }>,
|
||||
stencil: super::StencilState,
|
||||
@ -34,7 +35,7 @@ impl super::CommandBuffer {
|
||||
self.label = None;
|
||||
self.commands.clear();
|
||||
self.data_bytes.clear();
|
||||
self.data_words.clear();
|
||||
self.queries.clear();
|
||||
}
|
||||
|
||||
fn add_marker(&mut self, marker: &str) -> Range<u32> {
|
||||
@ -78,6 +79,7 @@ impl super::CommandEncoder {
|
||||
if self.state.dirty_vbuf_mask & (1 << index) == 0 {
|
||||
continue;
|
||||
}
|
||||
let vb = vb.as_ref().unwrap();
|
||||
let instance_offset = match vb_desc.step {
|
||||
wgt::VertexStepMode::Vertex => 0,
|
||||
wgt::VertexStepMode::Instance => first_instance * vb_desc.stride,
|
||||
@ -100,13 +102,14 @@ impl super::CommandEncoder {
|
||||
self.state.vertex_buffers[attribute.buffer_index as usize].clone();
|
||||
|
||||
let mut attribute_desc = attribute.clone();
|
||||
attribute_desc.offset += buffer.offset as u32;
|
||||
let vb = buffer.unwrap();
|
||||
attribute_desc.offset += vb.offset as u32;
|
||||
if buffer_desc.step == wgt::VertexStepMode::Instance {
|
||||
attribute_desc.offset += buffer_desc.stride * first_instance;
|
||||
}
|
||||
|
||||
self.cmd_buffer.commands.push(C::SetVertexAttribute {
|
||||
buffer: Some(buffer.raw),
|
||||
buffer: Some(vb.raw),
|
||||
buffer_desc,
|
||||
attribute_desc,
|
||||
});
|
||||
@ -352,11 +355,11 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
|
||||
offset: wgt::BufferAddress,
|
||||
_stride: wgt::BufferSize,
|
||||
) {
|
||||
let start = self.cmd_buffer.data_words.len();
|
||||
let start = self.cmd_buffer.queries.len();
|
||||
self.cmd_buffer
|
||||
.data_words
|
||||
.queries
|
||||
.extend_from_slice(&set.queries[range.start as usize..range.end as usize]);
|
||||
let query_range = start as u32..self.cmd_buffer.data_words.len() as u32;
|
||||
let query_range = start as u32..self.cmd_buffer.queries.len() as u32;
|
||||
self.cmd_buffer.commands.push(C::CopyQueryResults {
|
||||
query_range,
|
||||
dst: buffer.raw,
|
||||
@ -741,8 +744,10 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
|
||||
) {
|
||||
self.state.dirty_vbuf_mask |= 1 << index;
|
||||
let (_, ref mut vb) = self.state.vertex_buffers[index as usize];
|
||||
vb.raw = binding.buffer.raw;
|
||||
vb.offset = binding.offset;
|
||||
*vb = Some(super::BufferBinding {
|
||||
raw: binding.buffer.raw,
|
||||
offset: binding.offset,
|
||||
});
|
||||
}
|
||||
unsafe fn set_viewport(&mut self, rect: &crate::Rect<f32>, depth: Range<f32>) {
|
||||
self.cmd_buffer.commands.push(C::SetViewport {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::conv;
|
||||
use crate::auxil::map_naga_stage;
|
||||
use glow::HasContext;
|
||||
use std::{convert::TryInto, iter, ptr, sync::Arc};
|
||||
use std::{convert::TryInto, iter, mem, ptr, sync::Arc};
|
||||
|
||||
type ShaderStage<'a> = (
|
||||
naga::ShaderStage,
|
||||
@ -91,7 +91,9 @@ impl super::Device {
|
||||
|
||||
let raw = gl.create_shader(target).unwrap();
|
||||
if gl.supports_debug() {
|
||||
gl.object_label(glow::SHADER, raw, label);
|
||||
//TODO: remove all transmutes from `object_label`
|
||||
// https://github.com/grovesNL/glow/issues/186
|
||||
gl.object_label(glow::SHADER, mem::transmute(raw), label);
|
||||
}
|
||||
|
||||
gl.shader_source(raw, shader);
|
||||
@ -173,7 +175,7 @@ impl super::Device {
|
||||
let program = gl.create_program().unwrap();
|
||||
if let Some(label) = label {
|
||||
if gl.supports_debug() {
|
||||
gl.object_label(glow::PROGRAM, program, Some(label));
|
||||
gl.object_label(glow::PROGRAM, mem::transmute(program), Some(label));
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,7 +354,7 @@ impl crate::Device<super::Api> for super::Device {
|
||||
|
||||
if let Some(label) = desc.label {
|
||||
if gl.supports_debug() {
|
||||
gl.object_label(glow::BUFFER, raw, Some(label));
|
||||
gl.object_label(glow::BUFFER, mem::transmute(raw), Some(label));
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,7 +454,7 @@ impl crate::Device<super::Api> for super::Device {
|
||||
|
||||
if let Some(label) = desc.label {
|
||||
if gl.supports_debug() {
|
||||
gl.object_label(glow::RENDERBUFFER, raw, Some(label));
|
||||
gl.object_label(glow::RENDERBUFFER, mem::transmute(raw), Some(label));
|
||||
}
|
||||
}
|
||||
|
||||
@ -530,7 +532,7 @@ impl crate::Device<super::Api> for super::Device {
|
||||
|
||||
if let Some(label) = desc.label {
|
||||
if gl.supports_debug() {
|
||||
gl.object_label(glow::TEXTURE, raw, Some(label));
|
||||
gl.object_label(glow::TEXTURE, mem::transmute(raw), Some(label));
|
||||
}
|
||||
}
|
||||
|
||||
@ -664,7 +666,7 @@ impl crate::Device<super::Api> for super::Device {
|
||||
|
||||
if let Some(label) = desc.label {
|
||||
if gl.supports_debug() {
|
||||
gl.object_label(glow::SAMPLER, raw, Some(label));
|
||||
gl.object_label(glow::SAMPLER, mem::transmute(raw), Some(label));
|
||||
}
|
||||
}
|
||||
|
||||
@ -966,7 +968,7 @@ impl crate::Device<super::Api> for super::Device {
|
||||
if let Some(label) = desc.label {
|
||||
temp_string.clear();
|
||||
let _ = write!(temp_string, "{}[{}]", label, i);
|
||||
gl.object_label(glow::QUERY, query, Some(&temp_string));
|
||||
gl.object_label(glow::QUERY, mem::transmute(query), Some(&temp_string));
|
||||
}
|
||||
}
|
||||
queries.push(query);
|
||||
|
@ -217,7 +217,7 @@ enum TextureInner {
|
||||
impl TextureInner {
|
||||
fn as_native(&self) -> (glow::Texture, BindTarget) {
|
||||
match *self {
|
||||
Self::Renderbuffer { raw, .. } => panic!("Unexpected renderbuffer {}", raw),
|
||||
Self::Renderbuffer { raw, .. } => panic!("Unexpected renderbuffer {:?}", raw),
|
||||
Self::Texture { raw, target } => (raw, target),
|
||||
}
|
||||
}
|
||||
@ -323,7 +323,7 @@ struct AttributeDesc {
|
||||
format_desc: VertexFormatDesc,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
#[derive(Clone, Debug)]
|
||||
struct BufferBinding {
|
||||
raw: glow::Buffer,
|
||||
offset: wgt::BufferAddress,
|
||||
@ -659,7 +659,7 @@ pub struct CommandBuffer {
|
||||
label: Option<String>,
|
||||
commands: Vec<Command>,
|
||||
data_bytes: Vec<u8>,
|
||||
data_words: Vec<u32>,
|
||||
queries: Vec<glow::Query>,
|
||||
}
|
||||
|
||||
//TODO: we would have something like `Arc<typed_arena::Arena>`
|
||||
|
@ -106,7 +106,7 @@ impl super::Queue {
|
||||
gl: &glow::Context,
|
||||
command: &C,
|
||||
data_bytes: &[u8],
|
||||
data_words: &[u32],
|
||||
queries: &[glow::Query],
|
||||
) {
|
||||
match *command {
|
||||
C::Draw {
|
||||
@ -515,9 +515,7 @@ impl super::Queue {
|
||||
dst_offset,
|
||||
} => {
|
||||
self.temp_query_results.clear();
|
||||
for &query in
|
||||
data_words[query_range.start as usize..query_range.end as usize].iter()
|
||||
{
|
||||
for &query in queries[query_range.start as usize..query_range.end as usize].iter() {
|
||||
let result = gl.get_query_parameter_u32(query, glow::QUERY_RESULT);
|
||||
self.temp_query_results.push(result as u64);
|
||||
}
|
||||
@ -948,7 +946,7 @@ impl crate::Queue<super::Api> for super::Queue {
|
||||
gl.push_debug_group(glow::DEBUG_SOURCE_APPLICATION, DEBUG_ID, label);
|
||||
}
|
||||
for command in cmd_buf.commands.iter() {
|
||||
self.process(gl, command, &cmd_buf.data_bytes, &cmd_buf.data_words);
|
||||
self.process(gl, command, &cmd_buf.data_bytes, &cmd_buf.queries);
|
||||
}
|
||||
if cmd_buf.label.is_some() {
|
||||
gl.pop_debug_group();
|
||||
|
@ -1,10 +1,6 @@
|
||||
use super::conv;
|
||||
|
||||
use ash::{
|
||||
extensions::khr,
|
||||
version::{DeviceV1_0, InstanceV1_0},
|
||||
vk,
|
||||
};
|
||||
use ash::{extensions::khr, vk};
|
||||
use parking_lot::Mutex;
|
||||
|
||||
use std::{ffi::CStr, mem, ptr, sync::Arc};
|
||||
|
@ -1,11 +1,7 @@
|
||||
use super::conv;
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use ash::{
|
||||
extensions::ext,
|
||||
version::{DeviceV1_0, DeviceV1_2},
|
||||
vk,
|
||||
};
|
||||
use ash::{extensions::ext, vk};
|
||||
use inplace_it::inplace_or_alloc_from_iter;
|
||||
|
||||
use std::{mem, ops::Range, slice};
|
||||
|
@ -1,11 +1,7 @@
|
||||
use super::conv;
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use ash::{
|
||||
extensions::khr,
|
||||
version::{DeviceV1_0, DeviceV1_2},
|
||||
vk,
|
||||
};
|
||||
use ash::{extensions::khr, vk};
|
||||
use inplace_it::inplace_or_alloc_from_iter;
|
||||
use parking_lot::Mutex;
|
||||
|
||||
|
@ -8,7 +8,6 @@ use std::{
|
||||
|
||||
use ash::{
|
||||
extensions::{ext, khr},
|
||||
version::{DeviceV1_0 as _, EntryV1_0 as _, InstanceV1_0 as _},
|
||||
vk,
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,6 @@ use std::{borrow::Borrow, ffi::CStr, sync::Arc};
|
||||
use arrayvec::ArrayVec;
|
||||
use ash::{
|
||||
extensions::{ext, khr},
|
||||
version::{DeviceV1_0, DeviceV1_2},
|
||||
vk,
|
||||
};
|
||||
use parking_lot::Mutex;
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "wgpu-info"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
authors = ["wgpu developers"]
|
||||
edition = "2018"
|
||||
description = "Adapter information and per-adapter test program"
|
||||
@ -11,4 +11,4 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
env_logger = "0.8"
|
||||
wgpu = { version = "0.9", path = "../wgpu" }
|
||||
wgpu = { version = "0.10", path = "../wgpu" }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "wgpu-types"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
authors = ["wgpu developers"]
|
||||
edition = "2018"
|
||||
description = "WebGPU types"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "wgpu"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
authors = ["wgpu developers"]
|
||||
edition = "2018"
|
||||
description = "Rusty WebGPU API wrapper"
|
||||
@ -8,7 +8,7 @@ homepage = "https://wgpu.rs/"
|
||||
repository = "https://github.com/gfx-rs/wgpu"
|
||||
keywords = ["graphics"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
exclude = ["etc/**/*", "examples/**/*", "tests/**/*", "Cargo.lock", "target/**/*"]
|
||||
exclude = ["etc/**/*", "examples/**/*.png", "tests/**/*", "Cargo.lock", "target/**/*"]
|
||||
autotests = false
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
@ -30,21 +30,25 @@ webgl = ["wgc"]
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
path = "../wgpu-core"
|
||||
version = "0.10"
|
||||
features = ["raw-window-handle"]
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
path = "../wgpu-core"
|
||||
version = "0.10"
|
||||
features = ["raw-window-handle"]
|
||||
optional = true
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
path = "../wgpu-types"
|
||||
version = "0.10"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.hal]
|
||||
package = "wgpu-hal"
|
||||
path = "../wgpu-hal"
|
||||
version = "0.10"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = "0.7"
|
||||
@ -74,14 +78,16 @@ pollster = "0.2"
|
||||
env_logger = "0.8"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "4e181d6"
|
||||
#git = "https://github.com/gfx-rs/naga"
|
||||
#rev = "4e181d6"
|
||||
version = "0.6"
|
||||
optional = true
|
||||
|
||||
# used to test all the example shaders
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "4e181d6"
|
||||
#git = "https://github.com/gfx-rs/naga"
|
||||
#rev = "4e181d6"
|
||||
version = "0.6"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[[example]]
|
||||
|
Loading…
Reference in New Issue
Block a user