@@ -22,9 +22,8 @@ use winapi::shared::{dxgiformat, winerror};
22
22
use winapi:: um:: { d3d12, d3dcommon} ;
23
23
use winapi:: Interface ;
24
24
25
- use native:: { self , descriptor } ;
25
+ use native;
26
26
27
- use device:: { ViewInfo , IDENTITY_MAPPING } ;
28
27
use root_constants:: RootConstant ;
29
28
use smallvec:: SmallVec ;
30
29
use {
@@ -664,12 +663,12 @@ impl CommandBuffer {
664
663
stencil : Option < u32 > ,
665
664
rects : & [ d3d12:: D3D12_RECT ] ,
666
665
) {
667
- let mut flags = native:: command_list :: ClearFlags :: empty ( ) ;
666
+ let mut flags = native:: ClearFlags :: empty ( ) ;
668
667
if depth. is_some ( ) {
669
- flags |= native:: command_list :: ClearFlags :: DEPTH ;
668
+ flags |= native:: ClearFlags :: DEPTH ;
670
669
}
671
670
if stencil. is_some ( ) {
672
- flags |= native:: command_list :: ClearFlags :: STENCIL ;
671
+ flags |= native:: ClearFlags :: STENCIL ;
673
672
}
674
673
675
674
self . raw . clear_depth_stencil_view (
@@ -1459,7 +1458,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1459
1458
1460
1459
let mut rtv_pool = descriptors_cpu:: HeapLinear :: new (
1461
1460
device,
1462
- descriptor :: HeapType :: Rtv ,
1461
+ native :: DescriptorHeapType :: Rtv ,
1463
1462
clear_rects. len ( ) ,
1464
1463
) ;
1465
1464
@@ -1473,7 +1472,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1473
1472
caps : image:: ViewCapabilities :: empty ( ) ,
1474
1473
view_kind : image:: ViewKind :: D2Array ,
1475
1474
format : attachment. dxgi_format ,
1476
- component_mapping : IDENTITY_MAPPING ,
1475
+ component_mapping : device :: IDENTITY_MAPPING ,
1477
1476
range : image:: SubresourceRange {
1478
1477
aspects : Aspects :: COLOR ,
1479
1478
levels : attachment. mip_levels . 0 .. attachment. mip_levels . 1 ,
@@ -1496,7 +1495,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1496
1495
1497
1496
let mut dsv_pool = descriptors_cpu:: HeapLinear :: new (
1498
1497
device,
1499
- descriptor :: HeapType :: Dsv ,
1498
+ native :: DescriptorHeapType :: Dsv ,
1500
1499
clear_rects. len ( ) ,
1501
1500
) ;
1502
1501
@@ -1510,7 +1509,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1510
1509
caps : image:: ViewCapabilities :: empty ( ) ,
1511
1510
view_kind : image:: ViewKind :: D2Array ,
1512
1511
format : attachment. dxgi_format ,
1513
- component_mapping : IDENTITY_MAPPING ,
1512
+ component_mapping : device :: IDENTITY_MAPPING ,
1514
1513
range : image:: SubresourceRange {
1515
1514
aspects : if depth. is_some ( ) {
1516
1515
Aspects :: DEPTH
@@ -1627,17 +1626,17 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1627
1626
// Descriptor heap for the current blit, only storing the src image
1628
1627
let ( srv_heap, _) = device. create_descriptor_heap (
1629
1628
1 ,
1630
- descriptor :: HeapType :: CbvSrvUav ,
1631
- descriptor :: HeapFlags :: SHADER_VISIBLE ,
1629
+ native :: DescriptorHeapType :: CbvSrvUav ,
1630
+ native :: DescriptorHeapFlags :: SHADER_VISIBLE ,
1632
1631
0 ,
1633
1632
) ;
1634
- let srv_desc = Device :: build_image_as_shader_resource_desc ( & ViewInfo {
1633
+ let srv_desc = Device :: build_image_as_shader_resource_desc ( & device :: ViewInfo {
1635
1634
resource : src. resource ,
1636
1635
kind : src. kind ,
1637
1636
caps : src. view_caps ,
1638
1637
view_kind : image:: ViewKind :: D2Array , // TODO
1639
1638
format : src. default_view_format . unwrap ( ) ,
1640
- component_mapping : IDENTITY_MAPPING ,
1639
+ component_mapping : device :: IDENTITY_MAPPING ,
1641
1640
range : image:: SubresourceRange {
1642
1641
aspects : format:: Aspects :: COLOR , // TODO
1643
1642
levels : 0 .. src. descriptor . MipLevels as _ ,
@@ -1675,7 +1674,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1675
1674
// WORKAROUND: renderdoc crashes if we destroy the pool too early
1676
1675
let rtv_pool = Device :: create_descriptor_heap_impl (
1677
1676
device,
1678
- descriptor :: HeapType :: Rtv ,
1677
+ native :: DescriptorHeapType :: Rtv ,
1679
1678
false ,
1680
1679
num_layers as _ ,
1681
1680
) ;
@@ -2503,7 +2502,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
2503
2502
2504
2503
unsafe fn begin_query ( & mut self , query : query:: Query < Backend > , flags : query:: ControlFlags ) {
2505
2504
let query_ty = match query. pool . ty {
2506
- native:: query :: HeapType :: Occlusion => {
2505
+ native:: QueryHeapType :: Occlusion => {
2507
2506
if flags. contains ( query:: ControlFlags :: PRECISE ) {
2508
2507
self . occlusion_query = Some ( OcclusionQuery :: Precise ( query. id ) ) ;
2509
2508
d3d12:: D3D12_QUERY_TYPE_OCCLUSION
@@ -2514,8 +2513,8 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
2514
2513
d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION
2515
2514
}
2516
2515
}
2517
- native:: query :: HeapType :: Timestamp => panic ! ( "Timestap queries are issued via " ) ,
2518
- native:: query :: HeapType :: PipelineStatistics => {
2516
+ native:: QueryHeapType :: Timestamp => panic ! ( "Timestap queries are issued via " ) ,
2517
+ native:: QueryHeapType :: PipelineStatistics => {
2519
2518
self . pipeline_stats_query = Some ( query. id ) ;
2520
2519
d3d12:: D3D12_QUERY_TYPE_PIPELINE_STATISTICS
2521
2520
}
@@ -2529,19 +2528,19 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
2529
2528
unsafe fn end_query ( & mut self , query : query:: Query < Backend > ) {
2530
2529
let id = query. id ;
2531
2530
let query_ty = match query. pool . ty {
2532
- native:: query :: HeapType :: Occlusion
2531
+ native:: QueryHeapType :: Occlusion
2533
2532
if self . occlusion_query == Some ( OcclusionQuery :: Precise ( id) ) =>
2534
2533
{
2535
2534
self . occlusion_query = None ;
2536
2535
d3d12:: D3D12_QUERY_TYPE_OCCLUSION
2537
2536
}
2538
- native:: query :: HeapType :: Occlusion
2537
+ native:: QueryHeapType :: Occlusion
2539
2538
if self . occlusion_query == Some ( OcclusionQuery :: Binary ( id) ) =>
2540
2539
{
2541
2540
self . occlusion_query = None ;
2542
2541
d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION
2543
2542
}
2544
- native:: query :: HeapType :: PipelineStatistics
2543
+ native:: QueryHeapType :: PipelineStatistics
2545
2544
if self . pipeline_stats_query == Some ( id) =>
2546
2545
{
2547
2546
self . pipeline_stats_query = None ;
0 commit comments