From 63fc9b6df71af8729343f0dbff7e6d418643d624 Mon Sep 17 00:00:00 2001 From: Charlton Rodda Date: Sun, 10 Dec 2023 00:06:19 +0000 Subject: [PATCH] Log message consistency --- src/graphics/d3d12.rs | 12 ++++++------ src/graphics/vulkan.rs | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/graphics/d3d12.rs b/src/graphics/d3d12.rs index d113cc4d..f14f6d7d 100644 --- a/src/graphics/d3d12.rs +++ b/src/graphics/d3d12.rs @@ -70,10 +70,10 @@ pub fn initialize_xr_graphics( &enabled_extensions, &[], )?; - info!("created instance"); + info!("created OpenXR instance"); let instance_props = xr_instance.properties()?; let xr_system_id = xr_instance.system(xr::FormFactor::HEAD_MOUNTED_DISPLAY)?; - info!("created system"); + info!("created OpenXR system"); let system_props = xr_instance.system_properties(xr_system_id).unwrap(); info!( "loaded OpenXR runtime: {} {} {}", @@ -120,7 +120,7 @@ pub fn initialize_xr_graphics( desc.AdapterLuid.HighPart == reqs.adapter_luid.HighPart && desc.AdapterLuid.LowPart == reqs.adapter_luid.LowPart }) - .context("Failed to find DXGI adapter matching LUID provided by runtime")?; + .context("failed to find DXGI adapter matching LUID provided by runtime")?; let wgpu_instance = unsafe { wgpu::Instance::from_hal::(wgpu_raw_instance) }; @@ -176,7 +176,7 @@ pub fn initialize_xr_graphics( let handle = wrapper.get_handle(); wgpu_instance .create_surface(&handle) - .expect("Failed to create wgpu surface") + .expect("failed to create wgpu surface") }); let (wgpu_format, d3d12_format) = surface @@ -192,7 +192,7 @@ pub fn initialize_xr_graphics( let first_supported_format = runtime_supported_formats .into_iter() .find_map(|d| surface_supported_formats.get(&d).map(|w|(*w, d))) - .context("Could not find runtime-supported format that was also supported on the surface \ + .context("could not find runtime-supported format that was also supported on the surface \ and that we know how to convert")?; Ok(first_supported_format) }) @@ -246,7 +246,7 @@ pub fn initialize_xr_graphics( wgpu_device.create_texture_from_hal::( wgpu_hal_texture, &wgpu::TextureDescriptor { - label: Some("VR Swapchain"), + label: Some("bevy_openxr swapchain"), size: wgpu::Extent3d { width: resolution.x, height: resolution.y, diff --git a/src/graphics/vulkan.rs b/src/graphics/vulkan.rs index 4ba1021a..b3999eea 100644 --- a/src/graphics/vulkan.rs +++ b/src/graphics/vulkan.rs @@ -47,7 +47,7 @@ pub fn initialize_xr_graphics( use wgpu_hal::{api::Vulkan as V, Api}; assert!(available_extensions.khr_vulkan_enable2); - info!("available xr exts: {:#?}", available_extensions); + info!("available OpenXR extensions: {:#?}", available_extensions); let mut enabled_extensions = xr::ExtensionSet::default(); enabled_extensions.khr_vulkan_enable2 = true; @@ -59,7 +59,7 @@ pub fn initialize_xr_graphics( // enabled_extensions.ext_hand_joints_motion_range = available_extensions.ext_hand_joints_motion_range; let available_layers = xr_entry.enumerate_layers()?; - info!("available xr layers: {:#?}", available_layers); + info!("available OpenXR layers: {:#?}", available_layers); let xr_instance = xr_entry.create_instance( &xr::ApplicationInfo { @@ -69,10 +69,10 @@ pub fn initialize_xr_graphics( &enabled_extensions, &[], )?; - info!("created instance"); + info!("created OpenXR instance"); let instance_props = xr_instance.properties()?; let xr_system_id = xr_instance.system(xr::FormFactor::HEAD_MOUNTED_DISPLAY)?; - info!("created system"); + info!("created OpenXR system"); let system_props = xr_instance.system_properties(xr_system_id).unwrap(); info!( "loaded OpenXR runtime: {} {} {}", @@ -119,7 +119,7 @@ pub fn initialize_xr_graphics( ash::extensions::khr::TimelineSemaphore::name(), ]; info!( - "creating vulkan instance with these extensions: {:#?}", + "creating Vulkan instance with these extensions: {:#?}", extensions ); @@ -143,7 +143,7 @@ pub fn initialize_xr_graphics( .enabled_extension_names(&extensions_cchar) as *const _ as *const _, ) - .context("XR error creating Vulkan instance") + .context("OpenXR error creating Vulkan instance") .unwrap() .map_err(vk::Result::from_raw) .context("Vulkan error creating Vulkan instance") @@ -154,7 +154,7 @@ pub fn initialize_xr_graphics( vk::Instance::from_raw(vk_instance as _), ) }; - info!("created vulkan instance"); + info!("created Vulkan instance"); let vk_instance_ptr = vk_instance.handle().as_raw() as *const c_void; @@ -227,7 +227,7 @@ pub fn initialize_xr_graphics( vk_physical_device.as_raw() as _, &info as *const _ as *const _, ) - .context("XR error creating Vulkan device")? + .context("OpenXR error creating Vulkan device")? .map_err(vk::Result::from_raw) .context("Vulkan error creating Vulkan device")?; @@ -352,7 +352,7 @@ pub fn initialize_xr_graphics( ::Device::texture_from_raw( color_image, &wgpu_hal::TextureDescriptor { - label: Some("VR Swapchain"), + label: Some("bevy_openxr swapchain"), // unused internally size: wgpu::Extent3d { width: resolution.x, height: resolution.y, @@ -374,7 +374,7 @@ pub fn initialize_xr_graphics( wgpu_device.create_texture_from_hal::( wgpu_hal_texture, &wgpu::TextureDescriptor { - label: Some("VR Swapchain"), + label: Some("bevy_openxr swapchain"), size: wgpu::Extent3d { width: resolution.x, height: resolution.y,