|
1 | 1 | //! Example showcasing [`gpu-allocator`] with types and functions from the [`windows`] crate. |
2 | | -use gpu_allocator::d3d12::{ |
3 | | - AllocationCreateDesc, Allocator, AllocatorCreateDesc, ID3D12DeviceVersion, ResourceCategory, |
| 2 | +use gpu_allocator::{ |
| 3 | + d3d12::{ |
| 4 | + AllocationCreateDesc, Allocator, AllocatorCreateDesc, ID3D12DeviceVersion, ResourceCategory, |
| 5 | + }, |
| 6 | + MemoryLocation, |
4 | 7 | }; |
5 | | -use gpu_allocator::MemoryLocation; |
6 | 8 | use log::*; |
7 | | -use windows::core::{Interface, Result}; |
8 | | -use windows::Win32::{ |
9 | | - Foundation::E_NOINTERFACE, |
10 | | - Graphics::{ |
11 | | - Direct3D::{D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_12_0}, |
12 | | - Direct3D12::{ |
13 | | - D3D12CreateDevice, ID3D12Device, ID3D12Resource, |
14 | | - D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT, D3D12_RESOURCE_DESC, |
15 | | - D3D12_RESOURCE_DIMENSION_BUFFER, D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COMMON, |
16 | | - D3D12_TEXTURE_LAYOUT_ROW_MAJOR, |
17 | | - }, |
18 | | - Dxgi::{ |
19 | | - Common::{DXGI_FORMAT_UNKNOWN, DXGI_SAMPLE_DESC}, |
20 | | - CreateDXGIFactory2, IDXGIAdapter4, IDXGIFactory6, DXGI_ADAPTER_FLAG3_SOFTWARE, |
21 | | - DXGI_ERROR_NOT_FOUND, |
| 9 | +use windows::{ |
| 10 | + core::{Interface, Result}, |
| 11 | + Win32::{ |
| 12 | + Foundation::E_NOINTERFACE, |
| 13 | + Graphics::{ |
| 14 | + Direct3D::{D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_12_0}, |
| 15 | + Direct3D12::{ |
| 16 | + D3D12CreateDevice, ID3D12Device, ID3D12Resource, |
| 17 | + D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT, D3D12_RESOURCE_DESC, |
| 18 | + D3D12_RESOURCE_DIMENSION_BUFFER, D3D12_RESOURCE_FLAG_NONE, |
| 19 | + D3D12_RESOURCE_STATE_COMMON, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, |
| 20 | + }, |
| 21 | + Dxgi::{ |
| 22 | + Common::{DXGI_FORMAT_UNKNOWN, DXGI_SAMPLE_DESC}, |
| 23 | + CreateDXGIFactory2, IDXGIAdapter4, IDXGIFactory6, DXGI_ADAPTER_FLAG3_SOFTWARE, |
| 24 | + DXGI_ERROR_NOT_FOUND, |
| 25 | + }, |
22 | 26 | }, |
23 | 27 | }, |
24 | 28 | }; |
|
0 commit comments