summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wgpu-hal/src/dx12
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/wgpu-hal/src/dx12')
-rw-r--r--third_party/rust/wgpu-hal/src/dx12/adapter.rs4
-rw-r--r--third_party/rust/wgpu-hal/src/dx12/command.rs4
-rw-r--r--third_party/rust/wgpu-hal/src/dx12/device.rs15
-rw-r--r--third_party/rust/wgpu-hal/src/dx12/instance.rs4
-rw-r--r--third_party/rust/wgpu-hal/src/dx12/mod.rs8
5 files changed, 28 insertions, 7 deletions
diff --git a/third_party/rust/wgpu-hal/src/dx12/adapter.rs b/third_party/rust/wgpu-hal/src/dx12/adapter.rs
index 960e1790a9..b417a88a6f 100644
--- a/third_party/rust/wgpu-hal/src/dx12/adapter.rs
+++ b/third_party/rust/wgpu-hal/src/dx12/adapter.rs
@@ -432,7 +432,9 @@ impl super::Adapter {
}
}
-impl crate::Adapter<super::Api> for super::Adapter {
+impl crate::Adapter for super::Adapter {
+ type A = super::Api;
+
unsafe fn open(
&self,
_features: wgt::Features,
diff --git a/third_party/rust/wgpu-hal/src/dx12/command.rs b/third_party/rust/wgpu-hal/src/dx12/command.rs
index 9d96d29cae..3c535b2234 100644
--- a/third_party/rust/wgpu-hal/src/dx12/command.rs
+++ b/third_party/rust/wgpu-hal/src/dx12/command.rs
@@ -249,7 +249,9 @@ impl super::CommandEncoder {
}
}
-impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
+impl crate::CommandEncoder for super::CommandEncoder {
+ type A = super::Api;
+
unsafe fn begin_encoding(&mut self, label: crate::Label) -> Result<(), crate::DeviceError> {
let list = loop {
if let Some(list) = self.free_lists.pop() {
diff --git a/third_party/rust/wgpu-hal/src/dx12/device.rs b/third_party/rust/wgpu-hal/src/dx12/device.rs
index 3603b033b8..23bd409dc4 100644
--- a/third_party/rust/wgpu-hal/src/dx12/device.rs
+++ b/third_party/rust/wgpu-hal/src/dx12/device.rs
@@ -323,7 +323,9 @@ impl super::Device {
}
}
-impl crate::Device<super::Api> for super::Device {
+impl crate::Device for super::Device {
+ type A = super::Api;
+
unsafe fn exit(mut self, _queue: super::Queue) {
self.rtv_pool.lock().free_handle(self.null_rtv_handle);
self.mem_allocator = None;
@@ -1098,7 +1100,16 @@ impl crate::Device<super::Api> for super::Device {
}
let mut dynamic_buffers = Vec::new();
- for (layout, entry) in desc.layout.entries.iter().zip(desc.entries.iter()) {
+ let layout_and_entry_iter = desc.entries.iter().map(|entry| {
+ let layout = desc
+ .layout
+ .entries
+ .iter()
+ .find(|layout_entry| layout_entry.binding == entry.binding)
+ .expect("internal error: no layout entry found with binding slot");
+ (layout, entry)
+ });
+ for (layout, entry) in layout_and_entry_iter {
match layout.ty {
wgt::BindingType::Buffer {
has_dynamic_offset: true,
diff --git a/third_party/rust/wgpu-hal/src/dx12/instance.rs b/third_party/rust/wgpu-hal/src/dx12/instance.rs
index 020809328e..1dba7101df 100644
--- a/third_party/rust/wgpu-hal/src/dx12/instance.rs
+++ b/third_party/rust/wgpu-hal/src/dx12/instance.rs
@@ -13,7 +13,9 @@ impl Drop for super::Instance {
}
}
-impl crate::Instance<super::Api> for super::Instance {
+impl crate::Instance for super::Instance {
+ type A = super::Api;
+
unsafe fn init(desc: &crate::InstanceDescriptor) -> Result<Self, crate::InstanceError> {
profiling::scope!("Init DX12 Backend");
let lib_main = d3d12::D3D12Lib::new().map_err(|e| {
diff --git a/third_party/rust/wgpu-hal/src/dx12/mod.rs b/third_party/rust/wgpu-hal/src/dx12/mod.rs
index 13b43f8aca..4f958943ca 100644
--- a/third_party/rust/wgpu-hal/src/dx12/mod.rs
+++ b/third_party/rust/wgpu-hal/src/dx12/mod.rs
@@ -639,7 +639,9 @@ impl SwapChain {
}
}
-impl crate::Surface<Api> for Surface {
+impl crate::Surface for Surface {
+ type A = Api;
+
unsafe fn configure(
&self,
device: &Device,
@@ -884,7 +886,9 @@ impl crate::Surface<Api> for Surface {
}
}
-impl crate::Queue<Api> for Queue {
+impl crate::Queue for Queue {
+ type A = Api;
+
unsafe fn submit(
&self,
command_buffers: &[&CommandBuffer],