@@ -22,9 +22,8 @@ use winapi::shared::{dxgiformat, winerror};
2222use  winapi:: um:: { d3d12,  d3dcommon} ; 
2323use  winapi:: Interface ; 
2424
25- use  native:: { self ,  descriptor } ; 
25+ use  native; 
2626
27- use  device:: { ViewInfo ,  IDENTITY_MAPPING } ; 
2827use  root_constants:: RootConstant ; 
2928use  smallvec:: SmallVec ; 
3029use  { 
@@ -664,12 +663,12 @@ impl CommandBuffer {
664663        stencil :  Option < u32 > , 
665664        rects :  & [ d3d12:: D3D12_RECT ] , 
666665    )  { 
667-         let  mut  flags = native:: command_list :: ClearFlags :: empty ( ) ; 
666+         let  mut  flags = native:: ClearFlags :: empty ( ) ; 
668667        if  depth. is_some ( )  { 
669-             flags |= native:: command_list :: ClearFlags :: DEPTH ; 
668+             flags |= native:: ClearFlags :: DEPTH ; 
670669        } 
671670        if  stencil. is_some ( )  { 
672-             flags |= native:: command_list :: ClearFlags :: STENCIL ; 
671+             flags |= native:: ClearFlags :: STENCIL ; 
673672        } 
674673
675674        self . raw . clear_depth_stencil_view ( 
@@ -1459,7 +1458,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
14591458
14601459                    let  mut  rtv_pool = descriptors_cpu:: HeapLinear :: new ( 
14611460                        device, 
1462-                         descriptor :: HeapType :: Rtv , 
1461+                         native :: DescriptorHeapType :: Rtv , 
14631462                        clear_rects. len ( ) , 
14641463                    ) ; 
14651464
@@ -1473,7 +1472,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
14731472                            caps :  image:: ViewCapabilities :: empty ( ) , 
14741473                            view_kind :  image:: ViewKind :: D2Array , 
14751474                            format :  attachment. dxgi_format , 
1476-                             component_mapping :  IDENTITY_MAPPING , 
1475+                             component_mapping :  device :: IDENTITY_MAPPING , 
14771476                            range :  image:: SubresourceRange  { 
14781477                                aspects :  Aspects :: COLOR , 
14791478                                levels :  attachment. mip_levels . 0  .. attachment. mip_levels . 1 , 
@@ -1496,7 +1495,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
14961495
14971496                    let  mut  dsv_pool = descriptors_cpu:: HeapLinear :: new ( 
14981497                        device, 
1499-                         descriptor :: HeapType :: Dsv , 
1498+                         native :: DescriptorHeapType :: Dsv , 
15001499                        clear_rects. len ( ) , 
15011500                    ) ; 
15021501
@@ -1510,7 +1509,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
15101509                            caps :  image:: ViewCapabilities :: empty ( ) , 
15111510                            view_kind :  image:: ViewKind :: D2Array , 
15121511                            format :  attachment. dxgi_format , 
1513-                             component_mapping :  IDENTITY_MAPPING , 
1512+                             component_mapping :  device :: IDENTITY_MAPPING , 
15141513                            range :  image:: SubresourceRange  { 
15151514                                aspects :  if  depth. is_some ( )  { 
15161515                                    Aspects :: DEPTH 
@@ -1627,17 +1626,17 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
16271626        // Descriptor heap for the current blit, only storing the src image 
16281627        let  ( srv_heap,  _)  = device. create_descriptor_heap ( 
16291628            1 , 
1630-             descriptor :: HeapType :: CbvSrvUav , 
1631-             descriptor :: HeapFlags :: SHADER_VISIBLE , 
1629+             native :: DescriptorHeapType :: CbvSrvUav , 
1630+             native :: DescriptorHeapFlags :: SHADER_VISIBLE , 
16321631            0 , 
16331632        ) ; 
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  { 
16351634            resource :  src. resource , 
16361635            kind :  src. kind , 
16371636            caps :  src. view_caps , 
16381637            view_kind :  image:: ViewKind :: D2Array ,  // TODO 
16391638            format :  src. default_view_format . unwrap ( ) , 
1640-             component_mapping :  IDENTITY_MAPPING , 
1639+             component_mapping :  device :: IDENTITY_MAPPING , 
16411640            range :  image:: SubresourceRange  { 
16421641                aspects :  format:: Aspects :: COLOR ,  // TODO 
16431642                levels :  0  .. src. descriptor . MipLevels  as  _ , 
@@ -1675,7 +1674,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
16751674            // WORKAROUND: renderdoc crashes if we destroy the pool too early 
16761675            let  rtv_pool = Device :: create_descriptor_heap_impl ( 
16771676                device, 
1678-                 descriptor :: HeapType :: Rtv , 
1677+                 native :: DescriptorHeapType :: Rtv , 
16791678                false , 
16801679                num_layers as  _ , 
16811680            ) ; 
@@ -2503,7 +2502,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
25032502
25042503    unsafe  fn  begin_query ( & mut  self ,  query :  query:: Query < Backend > ,  flags :  query:: ControlFlags )  { 
25052504        let  query_ty = match  query. pool . ty  { 
2506-             native:: query :: HeapType :: Occlusion  => { 
2505+             native:: QueryHeapType :: Occlusion  => { 
25072506                if  flags. contains ( query:: ControlFlags :: PRECISE )  { 
25082507                    self . occlusion_query  = Some ( OcclusionQuery :: Precise ( query. id ) ) ; 
25092508                    d3d12:: D3D12_QUERY_TYPE_OCCLUSION 
@@ -2514,8 +2513,8 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
25142513                    d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION 
25152514                } 
25162515            } 
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  => { 
25192518                self . pipeline_stats_query  = Some ( query. id ) ; 
25202519                d3d12:: D3D12_QUERY_TYPE_PIPELINE_STATISTICS 
25212520            } 
@@ -2529,19 +2528,19 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
25292528    unsafe  fn  end_query ( & mut  self ,  query :  query:: Query < Backend > )  { 
25302529        let  id = query. id ; 
25312530        let  query_ty = match  query. pool . ty  { 
2532-             native:: query :: HeapType :: Occlusion 
2531+             native:: QueryHeapType :: Occlusion 
25332532                if  self . occlusion_query  == Some ( OcclusionQuery :: Precise ( id) )  =>
25342533            { 
25352534                self . occlusion_query  = None ; 
25362535                d3d12:: D3D12_QUERY_TYPE_OCCLUSION 
25372536            } 
2538-             native:: query :: HeapType :: Occlusion 
2537+             native:: QueryHeapType :: Occlusion 
25392538                if  self . occlusion_query  == Some ( OcclusionQuery :: Binary ( id) )  =>
25402539            { 
25412540                self . occlusion_query  = None ; 
25422541                d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION 
25432542            } 
2544-             native:: query :: HeapType :: PipelineStatistics 
2543+             native:: QueryHeapType :: PipelineStatistics 
25452544                if  self . pipeline_stats_query  == Some ( id)  =>
25462545            { 
25472546                self . pipeline_stats_query  = None ; 
0 commit comments