@@ -32,8 +32,6 @@ use winapi::{
32
32
Interface ,
33
33
} ;
34
34
35
- use device:: { ViewInfo , IDENTITY_MAPPING } ;
36
- use native:: descriptor;
37
35
use smallvec:: SmallVec ;
38
36
39
37
use crate :: {
@@ -676,12 +674,12 @@ impl CommandBuffer {
676
674
stencil : Option < u32 > ,
677
675
rects : & [ d3d12:: D3D12_RECT ] ,
678
676
) {
679
- let mut flags = native:: command_list :: ClearFlags :: empty ( ) ;
677
+ let mut flags = native:: ClearFlags :: empty ( ) ;
680
678
if depth. is_some ( ) {
681
- flags |= native:: command_list :: ClearFlags :: DEPTH ;
679
+ flags |= native:: ClearFlags :: DEPTH ;
682
680
}
683
681
if stencil. is_some ( ) {
684
- flags |= native:: command_list :: ClearFlags :: STENCIL ;
682
+ flags |= native:: ClearFlags :: STENCIL ;
685
683
}
686
684
687
685
self . raw . clear_depth_stencil_view (
@@ -1482,7 +1480,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1482
1480
1483
1481
let mut rtv_pool = descriptors_cpu:: HeapLinear :: new (
1484
1482
device,
1485
- descriptor :: HeapType :: Rtv ,
1483
+ native :: DescriptorHeapType :: Rtv ,
1486
1484
clear_rects. len ( ) ,
1487
1485
) ;
1488
1486
@@ -1496,7 +1494,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1496
1494
caps : image:: ViewCapabilities :: empty ( ) ,
1497
1495
view_kind : image:: ViewKind :: D2Array ,
1498
1496
format : attachment. dxgi_format ,
1499
- component_mapping : IDENTITY_MAPPING ,
1497
+ component_mapping : device :: IDENTITY_MAPPING ,
1500
1498
range : image:: SubresourceRange {
1501
1499
aspects : Aspects :: COLOR ,
1502
1500
levels : attachment. mip_levels . 0 .. attachment. mip_levels . 1 ,
@@ -1519,7 +1517,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1519
1517
1520
1518
let mut dsv_pool = descriptors_cpu:: HeapLinear :: new (
1521
1519
device,
1522
- descriptor :: HeapType :: Dsv ,
1520
+ native :: DescriptorHeapType :: Dsv ,
1523
1521
clear_rects. len ( ) ,
1524
1522
) ;
1525
1523
@@ -1533,7 +1531,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1533
1531
caps : image:: ViewCapabilities :: empty ( ) ,
1534
1532
view_kind : image:: ViewKind :: D2Array ,
1535
1533
format : attachment. dxgi_format ,
1536
- component_mapping : IDENTITY_MAPPING ,
1534
+ component_mapping : device :: IDENTITY_MAPPING ,
1537
1535
range : image:: SubresourceRange {
1538
1536
aspects : if depth. is_some ( ) {
1539
1537
Aspects :: DEPTH
@@ -1650,17 +1648,17 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1650
1648
// Descriptor heap for the current blit, only storing the src image
1651
1649
let ( srv_heap, _) = device. create_descriptor_heap (
1652
1650
1 ,
1653
- descriptor :: HeapType :: CbvSrvUav ,
1654
- descriptor :: HeapFlags :: SHADER_VISIBLE ,
1651
+ native :: DescriptorHeapType :: CbvSrvUav ,
1652
+ native :: DescriptorHeapFlags :: SHADER_VISIBLE ,
1655
1653
0 ,
1656
1654
) ;
1657
- let srv_desc = Device :: build_image_as_shader_resource_desc ( & ViewInfo {
1655
+ let srv_desc = Device :: build_image_as_shader_resource_desc ( & device :: ViewInfo {
1658
1656
resource : src. resource ,
1659
1657
kind : src. kind ,
1660
1658
caps : src. view_caps ,
1661
1659
view_kind : image:: ViewKind :: D2Array , // TODO
1662
1660
format : src. default_view_format . unwrap ( ) ,
1663
- component_mapping : IDENTITY_MAPPING ,
1661
+ component_mapping : device :: IDENTITY_MAPPING ,
1664
1662
range : image:: SubresourceRange {
1665
1663
aspects : format:: Aspects :: COLOR , // TODO
1666
1664
levels : 0 .. src. descriptor . MipLevels as _ ,
@@ -1698,7 +1696,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
1698
1696
// WORKAROUND: renderdoc crashes if we destroy the pool too early
1699
1697
let rtv_pool = Device :: create_descriptor_heap_impl (
1700
1698
device,
1701
- descriptor :: HeapType :: Rtv ,
1699
+ native :: DescriptorHeapType :: Rtv ,
1702
1700
false ,
1703
1701
num_layers as _ ,
1704
1702
) ;
@@ -2526,7 +2524,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
2526
2524
2527
2525
unsafe fn begin_query ( & mut self , query : query:: Query < Backend > , flags : query:: ControlFlags ) {
2528
2526
let query_ty = match query. pool . ty {
2529
- native:: query :: HeapType :: Occlusion => {
2527
+ native:: QueryHeapType :: Occlusion => {
2530
2528
if flags. contains ( query:: ControlFlags :: PRECISE ) {
2531
2529
self . occlusion_query = Some ( OcclusionQuery :: Precise ( query. id ) ) ;
2532
2530
d3d12:: D3D12_QUERY_TYPE_OCCLUSION
@@ -2537,8 +2535,8 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
2537
2535
d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION
2538
2536
}
2539
2537
}
2540
- native:: query :: HeapType :: Timestamp => panic ! ( "Timestap queries are issued via " ) ,
2541
- native:: query :: HeapType :: PipelineStatistics => {
2538
+ native:: QueryHeapType :: Timestamp => panic ! ( "Timestap queries are issued via " ) ,
2539
+ native:: QueryHeapType :: PipelineStatistics => {
2542
2540
self . pipeline_stats_query = Some ( query. id ) ;
2543
2541
d3d12:: D3D12_QUERY_TYPE_PIPELINE_STATISTICS
2544
2542
}
@@ -2552,19 +2550,19 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
2552
2550
unsafe fn end_query ( & mut self , query : query:: Query < Backend > ) {
2553
2551
let id = query. id ;
2554
2552
let query_ty = match query. pool . ty {
2555
- native:: query :: HeapType :: Occlusion
2553
+ native:: QueryHeapType :: Occlusion
2556
2554
if self . occlusion_query == Some ( OcclusionQuery :: Precise ( id) ) =>
2557
2555
{
2558
2556
self . occlusion_query = None ;
2559
2557
d3d12:: D3D12_QUERY_TYPE_OCCLUSION
2560
2558
}
2561
- native:: query :: HeapType :: Occlusion
2559
+ native:: QueryHeapType :: Occlusion
2562
2560
if self . occlusion_query == Some ( OcclusionQuery :: Binary ( id) ) =>
2563
2561
{
2564
2562
self . occlusion_query = None ;
2565
2563
d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION
2566
2564
}
2567
- native:: query :: HeapType :: PipelineStatistics
2565
+ native:: QueryHeapType :: PipelineStatistics
2568
2566
if self . pipeline_stats_query == Some ( id) =>
2569
2567
{
2570
2568
self . pipeline_stats_query = None ;
0 commit comments