210: Update WGPU deps to rev 08e8d406c1 r=kvark a=aloucks

I also moved the `path` chunks in `Cargo.toml` to a single `[patch]` section so that it's one block to commment/uncomment for local development. 

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
This commit is contained in:
bors[bot]
2020-03-23 01:03:33 +00:00
committed by GitHub
6 changed files with 25 additions and 24 deletions

View File

@@ -27,22 +27,19 @@ vulkan = ["wgn/vulkan-portability"]
package = "wgpu-native"
version = "0.4"
git = "https://github.com/gfx-rs/wgpu"
rev = "39f17e50754aba6beeeabdd868ddfd700f9710c5"
#path = "../wgpu/wgpu-native"
rev = "08e8d406c175579da5ef18c1abf4d6c00e2a9726"
[dependencies.wgc]
package = "wgpu-core"
version = "0.1"
git = "https://github.com/gfx-rs/wgpu"
rev = "39f17e50754aba6beeeabdd868ddfd700f9710c5"
#path = "../wgpu/wgpu-core"
rev = "08e8d406c175579da5ef18c1abf4d6c00e2a9726"
[dependencies.wgt]
package = "wgpu-types"
version = "0.1"
git = "https://github.com/gfx-rs/wgpu"
rev = "39f17e50754aba6beeeabdd868ddfd700f9710c5"
#path = "../wgpu/wgpu-types"
rev = "08e8d406c175579da5ef18c1abf4d6c00e2a9726"
[dependencies]
arrayvec = "0.5"
@@ -59,3 +56,8 @@ winit = "0.22"
rand = "0.7.2"
zerocopy = "0.2"
futures = "0.3"
#[patch."https://github.com/gfx-rs/wgpu"]
#wgc = { version = "0.1.0", package = "wgpu-core", path = "../wgpu/wgpu-core" }
#wgt = { version = "0.1.0", package = "wgpu-types", path = "../wgpu/wgpu-types" }
#wgn = { version = "0.4.0", package = "wgpu-native", path = "../wgpu/wgpu-native" }

View File

@@ -141,6 +141,7 @@ impl framework::Example for Example {
visibility: wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture {
multisampled: false,
component_type: wgpu::TextureComponentType::Float,
dimension: wgpu::TextureViewDimension::D2,
},
},

View File

@@ -86,6 +86,7 @@ impl Example {
visibility: wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture {
multisampled: false,
component_type: wgpu::TextureComponentType::Float,
dimension: wgpu::TextureViewDimension::D2,
},
},
@@ -225,6 +226,7 @@ impl framework::Example for Example {
binding: 1,
visibility: wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture {
component_type: wgpu::TextureComponentType::Float,
multisampled: false,
dimension: wgpu::TextureViewDimension::D2,
},

View File

@@ -501,6 +501,7 @@ impl framework::Example for Example {
visibility: wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture {
multisampled: false,
component_type: wgpu::TextureComponentType::Float,
dimension: wgpu::TextureViewDimension::D2Array,
},
},

View File

@@ -65,6 +65,7 @@ impl framework::Example for Skybox {
binding: 1,
visibility: wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture {
component_type: wgpu::TextureComponentType::Float,
multisampled: false,
dimension: wgpu::TextureViewDimension::Cube,
},

View File

@@ -20,11 +20,7 @@ use std::{
pub use wgt::*;
pub use wgc::{
Extent3d,
Origin3d,
command::{
CommandBufferDescriptor,
},
binding_model::TextureComponentType,
device::{
BIND_BUFFER_ALIGNMENT,
},
@@ -32,15 +28,6 @@ pub use wgc::{
AdapterInfo,
DeviceType,
},
resource::{
AddressMode,
FilterMode,
SamplerDescriptor,
TextureAspect,
TextureDescriptor,
TextureDimension,
TextureViewDescriptor,
},
};
//TODO: avoid heap allocating vectors during resource creation.
@@ -262,10 +249,12 @@ pub enum BindingType {
},
SampledTexture {
dimension: TextureViewDimension,
component_type: TextureComponentType,
multisampled: bool,
},
StorageTexture {
dimension: TextureViewDimension,
component_type: TextureComponentType,
format: TextureFormat,
readonly: bool,
},
@@ -606,8 +595,8 @@ impl Device {
self.id,
&bm::BindGroupDescriptor {
layout: desc.layout.id,
bindings: bindings.as_ptr(),
bindings_length: bindings.len(),
entries: bindings.as_ptr(),
entries_length: bindings.len(),
},
),
}
@@ -655,6 +644,11 @@ impl Device {
BindingType::StorageTexture { dimension, .. } => dimension,
_ => TextureViewDimension::D2,
},
texture_component_type: match bind.ty {
BindingType::SampledTexture { component_type, .. } |
BindingType::StorageTexture { component_type, .. } => component_type,
_ => bm::TextureComponentType::Float,
},
storage_texture_format: match bind.ty {
BindingType::StorageTexture { format, .. } => format,
_ => TextureFormat::Rgb10a2Unorm, // doesn't matter
@@ -665,8 +659,8 @@ impl Device {
id: wgn::wgpu_device_create_bind_group_layout(
self.id,
&bm::BindGroupLayoutDescriptor {
bindings: temp_layouts.as_ptr(),
bindings_length: temp_layouts.len(),
entries: temp_layouts.as_ptr(),
entries_length: temp_layouts.len(),
},
),
}