From 08352676da4ae0c56102bf38c2aba78189e72bf5 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sat, 12 May 2018 21:17:49 -0400 Subject: [PATCH] Gfx update, depth bounds and blend constants --- Cargo.lock | 8 ++++---- libportability-gfx/src/impls.rs | 15 ++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7b2462..62ee113 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -252,7 +252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "gfx-backend-dx12" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#f10a8fb4eda0e899a9e3e35777ebf0517b0fc77d" +source = "git+https://github.com/gfx-rs/gfx#8d2b93a8dfd9c99b7cbec703924a628d56cc9c73" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -268,7 +268,7 @@ dependencies = [ [[package]] name = "gfx-backend-metal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#f10a8fb4eda0e899a9e3e35777ebf0517b0fc77d" +source = "git+https://github.com/gfx-rs/gfx#8d2b93a8dfd9c99b7cbec703924a628d56cc9c73" dependencies = [ "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "cocoa 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -288,7 +288,7 @@ dependencies = [ [[package]] name = "gfx-backend-vulkan" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#f10a8fb4eda0e899a9e3e35777ebf0517b0fc77d" +source = "git+https://github.com/gfx-rs/gfx#8d2b93a8dfd9c99b7cbec703924a628d56cc9c73" dependencies = [ "ash 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -306,7 +306,7 @@ dependencies = [ [[package]] name = "gfx-hal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#f10a8fb4eda0e899a9e3e35777ebf0517b0fc77d" +source = "git+https://github.com/gfx-rs/gfx#8d2b93a8dfd9c99b7cbec703924a628d56cc9c73" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index 85a1edb..9c399e6 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -2715,18 +2715,19 @@ pub extern "C" fn gfxCmdSetDepthBias( } #[inline] pub extern "C" fn gfxCmdSetBlendConstants( - _commandBuffer: VkCommandBuffer, - _blendConstants: *const f32, + mut commandBuffer: VkCommandBuffer, + blendConstants: *const f32, ) { - unimplemented!() + let value = unsafe { *(blendConstants as *const hal::pso::ColorValue) }; + commandBuffer.set_blend_constants(value); } #[inline] pub extern "C" fn gfxCmdSetDepthBounds( - _commandBuffer: VkCommandBuffer, - _minDepthBounds: f32, - _maxDepthBounds: f32, + mut commandBuffer: VkCommandBuffer, + minDepthBounds: f32, + maxDepthBounds: f32, ) { - unimplemented!() + commandBuffer.set_depth_bounds(minDepthBounds .. maxDepthBounds); } #[inline] pub extern "C" fn gfxCmdSetStencilCompareMask(