diff --git a/Cargo.toml b/Cargo.toml index ac0fe414c1..f811731274 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,16 +24,16 @@ vulkan-portability = ["wgc/gfx-backend-vulkan"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" -version = "0.6" -#git = "https://github.com/gfx-rs/wgpu" -#rev = "096c57008f2907c07ddaa7d0ff02fae21a5e676b" +#version = "0.6" +git = "https://github.com/gfx-rs/wgpu" +rev = "0bb6bb8647a652e82c795fdc27a282e131d7cba3" features = ["raw-window-handle"] [dependencies.wgt] package = "wgpu-types" -version = "0.6" -#git = "https://github.com/gfx-rs/wgpu" -#rev = "096c57008f2907c07ddaa7d0ff02fae21a5e676b" +#version = "0.6" +git = "https://github.com/gfx-rs/wgpu" +rev = "0bb6bb8647a652e82c795fdc27a282e131d7cba3" [dependencies] arrayvec = "0.5" diff --git a/src/backend/direct.rs b/src/backend/direct.rs index 2907310d91..8cd5252b2c 100644 --- a/src/backend/direct.rs +++ b/src/backend/direct.rs @@ -862,6 +862,7 @@ impl crate::Context for Context { lod_max_clamp: desc.lod_max_clamp, compare: desc.compare, anisotropy_clamp: desc.anisotropy_clamp, + border_color: desc.border_color, }, PhantomData )) diff --git a/src/backend/web.rs b/src/backend/web.rs index bfea9e8f2f..08ed70da15 100644 --- a/src/backend/web.rs +++ b/src/backend/web.rs @@ -623,6 +623,7 @@ fn map_address_mode(mode: wgt::AddressMode) -> web_sys::GpuAddressMode { wgt::AddressMode::ClampToEdge => web_sys::GpuAddressMode::ClampToEdge, wgt::AddressMode::Repeat => web_sys::GpuAddressMode::Repeat, wgt::AddressMode::MirrorRepeat => web_sys::GpuAddressMode::MirrorRepeat, + wgt::AddressMode::ClampToBorder => unimplemented!(), } } diff --git a/src/lib.rs b/src/lib.rs index 6436466a71..6444687ab1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,12 +37,12 @@ pub use wgt::{ ColorStateDescriptor, ColorWrite, CommandBufferDescriptor, CompareFunction, CullMode, DepthStencilStateDescriptor, DeviceDescriptor, DynamicOffset, Extent3d, Features, FilterMode, FrontFace, IndexFormat, InputStepMode, Limits, Origin3d, PowerPreference, PresentMode, - PrimitiveTopology, PushConstantRange, RasterizationStateDescriptor, ShaderLocation, - ShaderStage, StencilOperation, StencilStateDescriptor, StencilStateFaceDescriptor, - SwapChainDescriptor, SwapChainStatus, TextureAspect, TextureComponentType, TextureDataLayout, - TextureDimension, TextureFormat, TextureUsage, TextureViewDimension, VertexAttributeDescriptor, - VertexFormat, BIND_BUFFER_ALIGNMENT, COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT, - PUSH_CONSTANT_ALIGNMENT, + PrimitiveTopology, PushConstantRange, RasterizationStateDescriptor, SamplerBorderColor, + ShaderLocation, ShaderStage, StencilOperation, StencilStateDescriptor, + StencilStateFaceDescriptor, SwapChainDescriptor, SwapChainStatus, TextureAspect, + TextureComponentType, TextureDataLayout, TextureDimension, TextureFormat, TextureUsage, + TextureViewDimension, VertexAttributeDescriptor, VertexFormat, BIND_BUFFER_ALIGNMENT, + COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT, }; use backend::Context as C; @@ -1060,6 +1060,8 @@ pub struct SamplerDescriptor<'a> { pub compare: Option, /// Valid values: 1, 2, 4, 8, and 16. pub anisotropy_clamp: Option, + /// Border color to use when address_mode is [`AddressMode::ClampToBorder`] + pub border_color: Option, } impl Default for SamplerDescriptor<'_> { @@ -1076,6 +1078,7 @@ impl Default for SamplerDescriptor<'_> { lod_max_clamp: std::f32::MAX, compare: None, anisotropy_clamp: None, + border_color: None, } } }