Switch to use gfx-rs latest and greatest master

This commit is contained in:
Dzmitry Malyshau committed 2019-09-06 10:05:53 -04:00
1 parent aa316279dc
commit 988d78435a
10 files changed
+149 -218

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
use super::CommandBuffer;
use crate::{hub::GfxBackend, track::TrackerSet, DeviceId, LifeGuard, Stored, SubmissionIndex};
use hal::{command::RawCommandBuffer, pool::RawCommandPool, Device};
use hal::{command::CommandBuffer as _, device::Device as _, pool::CommandPool as _};
use log::trace;
use parking_lot::Mutex;
@@ -16,7 +16,7 @@ struct CommandPool<B: hal::Backend> {
impl<B: hal::Backend> CommandPool<B> {
fn allocate(&mut self) -> B::CommandBuffer {
if self.available.is_empty() {
let extra = self.raw.allocate_vec(20, hal::command::RawLevel::Primary);
let extra = self.raw.allocate_vec(20, hal::command::Level::Primary);
self.available.extend(extra);
}
@@ -96,7 +96,7 @@ impl<B: GfxBackend> CommandAllocator<B> {
let pool = inner.pools.get_mut(&cmd_buf.recorded_thread_id).unwrap();
if pool.available.is_empty() {
let extra = pool.raw.allocate_vec(20, hal::command::RawLevel::Primary);
let extra = pool.raw.allocate_vec(20, hal::command::Level::Primary);
pool.available.extend(extra);
}
+1 -1
View File
@@ -17,7 +17,7 @@ use crate::{
BIND_BUFFER_ALIGNMENT,
};
use hal::{self, command::RawCommandBuffer};
use hal::{self, command::CommandBuffer as _};
use log::trace;
use std::{iter, slice};
+20 -18
View File
@@ -41,7 +41,7 @@ use crate::{
};
use arrayvec::ArrayVec;
use hal::{adapter::PhysicalDevice, command::RawCommandBuffer, Device as _};
use hal::{adapter::PhysicalDevice as _, command::CommandBuffer as _, device::Device as _};
use log::trace;
#[cfg(not(feature = "remote"))]
@@ -576,19 +576,19 @@ pub fn command_encoder_begin_render_pass<B: GfxBackend>(
| ChannelType::Sfloat
| ChannelType::Uscaled
| ChannelType::Sscaled
| ChannelType::Srgb => hal::command::ClearColor::Sfloat(
conv::map_color_f32(&at.clear_color),
),
ChannelType::Sint => {
hal::command::ClearColor::Sint(conv::map_color_i32(&at.clear_color))
}
ChannelType::Uint => {
hal::command::ClearColor::Uint(conv::map_color_u32(&at.clear_color))
}
| ChannelType::Srgb => hal::command::ClearColor {
float32: conv::map_color_f32(&at.clear_color),
},
ChannelType::Sint => hal::command::ClearColor {
sint32: conv::map_color_i32(&at.clear_color),
},
ChannelType::Uint => hal::command::ClearColor {
uint32: conv::map_color_u32(&at.clear_color),
},
};
Some(hal::command::ClearValueRaw::from(
hal::command::ClearValue::Color(value),
))
Some(hal::command::ClearValue {
color: value,
})
}
}
})
@@ -596,11 +596,13 @@ pub fn command_encoder_begin_render_pass<B: GfxBackend>(
match (at.depth_load_op, at.stencil_load_op) {
(LoadOp::Load, LoadOp::Load) => None,
(LoadOp::Clear, _) | (_, LoadOp::Clear) => {
let value =
hal::command::ClearDepthStencil(at.clear_depth, at.clear_stencil);
Some(hal::command::ClearValueRaw::from(
hal::command::ClearValue::DepthStencil(value),
))
let value = hal::command::ClearDepthStencil {
depth: at.clear_depth,
stencil: at.clear_stencil,
};
Some(hal::command::ClearValue {
depth_stencil: value,
})
}
}
}));
+1 -1
View File
@@ -20,7 +20,7 @@ use crate::{
Stored,
};
use hal::command::RawCommandBuffer;
use hal::command::CommandBuffer as _;
use log::trace;
use std::{iter, ops::Range, slice};
+1 -1
View File
@@ -16,7 +16,7 @@ use crate::{
};
use copyless::VecHelper as _;
use hal::command::RawCommandBuffer;
use hal::command::CommandBuffer as _;
use std::iter;