Skip to content

Commit a994e4e

Browse files
committed
Rename modules
1 parent ea58561 commit a994e4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+115
-118
lines changed

ash-window/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,38 @@ pub unsafe fn create_surface(
4949
let surface_desc = vk::Win32SurfaceCreateInfoKHR::default()
5050
.hinstance(window.hinstance as isize)
5151
.hwnd(window.hwnd as isize);
52-
let surface_fn = win32_surface::Win32Surface::new(entry, instance);
52+
let surface_fn = win32_surface::Instance::new(entry, instance);
5353
surface_fn.create_win32_surface(&surface_desc, allocation_callbacks)
5454
}
5555

5656
(RawDisplayHandle::Wayland(display), RawWindowHandle::Wayland(window)) => {
5757
let surface_desc = vk::WaylandSurfaceCreateInfoKHR::default()
5858
.display(display.display)
5959
.surface(window.surface);
60-
let surface_fn = wayland_surface::WaylandSurface::new(entry, instance);
60+
let surface_fn = wayland_surface::Instance::new(entry, instance);
6161
surface_fn.create_wayland_surface(&surface_desc, allocation_callbacks)
6262
}
6363

6464
(RawDisplayHandle::Xlib(display), RawWindowHandle::Xlib(window)) => {
6565
let surface_desc = vk::XlibSurfaceCreateInfoKHR::default()
6666
.dpy(display.display.cast())
6767
.window(window.window);
68-
let surface_fn = xlib_surface::XlibSurface::new(entry, instance);
68+
let surface_fn = xlib_surface::Instance::new(entry, instance);
6969
surface_fn.create_xlib_surface(&surface_desc, allocation_callbacks)
7070
}
7171

7272
(RawDisplayHandle::Xcb(display), RawWindowHandle::Xcb(window)) => {
7373
let surface_desc = vk::XcbSurfaceCreateInfoKHR::default()
7474
.connection(display.connection)
7575
.window(window.window);
76-
let surface_fn = xcb_surface::XcbSurface::new(entry, instance);
76+
let surface_fn = xcb_surface::Instance::new(entry, instance);
7777
surface_fn.create_xcb_surface(&surface_desc, allocation_callbacks)
7878
}
7979

8080
(RawDisplayHandle::Android(_), RawWindowHandle::AndroidNdk(window)) => {
8181
let surface_desc =
8282
vk::AndroidSurfaceCreateInfoKHR::default().window(window.a_native_window);
83-
let surface_fn = android_surface::AndroidSurface::new(entry, instance);
83+
let surface_fn = android_surface::Instance::new(entry, instance);
8484
surface_fn.create_android_surface(&surface_desc, allocation_callbacks)
8585
}
8686

ash/src/extensions/ext/hdr_metadata.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_hdr_metadata.html>
22
33
use crate::vk;
4-
use crate::{Device, Instance};
54
use std::ffi::CStr;
65
use std::mem;
76

87
pub const NAME: &CStr = vk::ext_hdr_metadata::NAME;
98

109
#[derive(Clone)]
11-
pub struct HdrMetadata {
10+
pub struct Device {
1211
handle: vk::Device,
1312
fp: vk::ext_hdr_metadata::DeviceFn,
1413
}
1514

16-
impl HdrMetadata {
17-
pub fn new(instance: &Instance, device: &Device) -> Self {
15+
impl Device {
16+
pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self {
1817
let handle = device.handle();
1918
let fp = vk::ext_hdr_metadata::DeviceFn::load(|name| unsafe {
2019
mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr()))

ash/src/extensions/ext/sample_locations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ impl Device {
3838

3939
/// High-level instance function wrapper
4040
#[derive(Clone)]
41-
pub struct SampleLocationsInstance {
41+
pub struct Instance {
4242
fp: vk::ext_sample_locations::InstanceFn,
4343
}
4444

45-
impl SampleLocationsInstance {
45+
impl Instance {
4646
pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self {
4747
let fp = vk::ext_sample_locations::InstanceFn::load(|name| unsafe {
4848
mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr()))

ash/src/extensions/khr/acceleration_structure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ use std::mem;
99
pub const NAME: &CStr = vk::khr_acceleration_structure::NAME;
1010

1111
#[derive(Clone)]
12-
pub struct AccelerationStructure {
12+
pub struct Device {
1313
handle: vk::Device,
1414
fp: vk::khr_acceleration_structure::DeviceFn,
1515
}
1616

17-
impl AccelerationStructure {
17+
impl Device {
1818
pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self {
1919
let handle = device.handle();
2020
let fp = vk::khr_acceleration_structure::DeviceFn::load(|name| unsafe {

ash/src/extensions/khr/android_surface.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ use std::mem;
99
pub const NAME: &CStr = vk::khr_android_surface::NAME;
1010

1111
#[derive(Clone)]
12-
pub struct AndroidSurface {
12+
pub struct Instance {
1313
handle: vk::Instance,
1414
fp: vk::khr_android_surface::InstanceFn,
1515
}
1616

17-
impl AndroidSurface {
17+
impl Instance {
1818
pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self {
1919
let handle = instance.handle();
2020
let fp = vk::khr_android_surface::InstanceFn::load(|name| unsafe {

ash/src/extensions/khr/buffer_device_address.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ use std::mem;
77
pub const NAME: &CStr = vk::khr_buffer_device_address::NAME;
88

99
#[derive(Clone)]
10-
pub struct BufferDeviceAddress {
10+
pub struct Device {
1111
handle: vk::Device,
1212
fp: vk::khr_buffer_device_address::DeviceFn,
1313
}
1414

15-
impl BufferDeviceAddress {
15+
impl Device {
1616
pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self {
1717
let handle = device.handle();
1818
let fp = vk::khr_buffer_device_address::DeviceFn::load(|name| unsafe {

ash/src/extensions/khr/cooperative_matrix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ use std::mem;
88
pub const NAME: &CStr = vk::khr_cooperative_matrix::NAME;
99

1010
#[derive(Clone)]
11-
pub struct CooperativeMatrix {
11+
pub struct Instance {
1212
fp: vk::khr_cooperative_matrix::InstanceFn,
1313
}
1414

15-
impl CooperativeMatrix {
15+
impl Instance {
1616
pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self {
1717
let handle = instance.handle();
1818
let fp = vk::khr_cooperative_matrix::InstanceFn::load(|name| unsafe {

ash/src/extensions/khr/copy_commands2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ use std::mem;
77
pub const NAME: &CStr = vk::khr_copy_commands2::NAME;
88

99
#[derive(Clone)]
10-
pub struct CopyCommands2 {
10+
pub struct Device {
1111
fp: vk::khr_copy_commands2::DeviceFn,
1212
}
1313

14-
impl CopyCommands2 {
14+
impl Device {
1515
pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self {
1616
let fp = vk::khr_copy_commands2::DeviceFn::load(|name| unsafe {
1717
mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))

ash/src/extensions/khr/create_render_pass2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ use std::mem;
99
pub const NAME: &CStr = vk::khr_create_renderpass2::NAME;
1010

1111
#[derive(Clone)]
12-
pub struct CreateRenderPass2 {
12+
pub struct Device {
1313
handle: vk::Device,
1414
fp: vk::khr_create_renderpass2::DeviceFn,
1515
}
1616

17-
impl CreateRenderPass2 {
17+
impl Device {
1818
pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self {
1919
let handle = device.handle();
2020
let fp = vk::khr_create_renderpass2::DeviceFn::load(|name| unsafe {

ash/src/extensions/khr/deferred_host_operations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ use std::mem;
99
pub const NAME: &CStr = vk::khr_deferred_host_operations::NAME;
1010

1111
#[derive(Clone)]
12-
pub struct DeferredHostOperations {
12+
pub struct Device {
1313
handle: vk::Device,
1414
fp: vk::khr_deferred_host_operations::DeviceFn,
1515
}
1616

17-
impl DeferredHostOperations {
17+
impl Device {
1818
pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self {
1919
let handle = device.handle();
2020
let fp = vk::khr_deferred_host_operations::DeviceFn::load(|name| unsafe {

0 commit comments

Comments
 (0)