@@ -32,8 +32,6 @@ use winapi::{
3232 Interface ,
3333} ;
3434
35- use device:: { ViewInfo , IDENTITY_MAPPING } ;
36- use native:: descriptor;
3735use smallvec:: SmallVec ;
3836
3937use crate :: {
@@ -676,12 +674,12 @@ impl CommandBuffer {
676674 stencil : Option < u32 > ,
677675 rects : & [ d3d12:: D3D12_RECT ] ,
678676 ) {
679- let mut flags = native:: command_list :: ClearFlags :: empty ( ) ;
677+ let mut flags = native:: ClearFlags :: empty ( ) ;
680678 if depth. is_some ( ) {
681- flags |= native:: command_list :: ClearFlags :: DEPTH ;
679+ flags |= native:: ClearFlags :: DEPTH ;
682680 }
683681 if stencil. is_some ( ) {
684- flags |= native:: command_list :: ClearFlags :: STENCIL ;
682+ flags |= native:: ClearFlags :: STENCIL ;
685683 }
686684
687685 self . raw . clear_depth_stencil_view (
@@ -1482,7 +1480,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
14821480
14831481 let mut rtv_pool = descriptors_cpu:: HeapLinear :: new (
14841482 device,
1485- descriptor :: HeapType :: Rtv ,
1483+ native :: DescriptorHeapType :: Rtv ,
14861484 clear_rects. len ( ) ,
14871485 ) ;
14881486
@@ -1496,7 +1494,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
14961494 caps : image:: ViewCapabilities :: empty ( ) ,
14971495 view_kind : image:: ViewKind :: D2Array ,
14981496 format : attachment. dxgi_format ,
1499- component_mapping : IDENTITY_MAPPING ,
1497+ component_mapping : device :: IDENTITY_MAPPING ,
15001498 range : image:: SubresourceRange {
15011499 aspects : Aspects :: COLOR ,
15021500 levels : attachment. mip_levels . 0 .. attachment. mip_levels . 1 ,
@@ -1519,7 +1517,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
15191517
15201518 let mut dsv_pool = descriptors_cpu:: HeapLinear :: new (
15211519 device,
1522- descriptor :: HeapType :: Dsv ,
1520+ native :: DescriptorHeapType :: Dsv ,
15231521 clear_rects. len ( ) ,
15241522 ) ;
15251523
@@ -1533,7 +1531,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
15331531 caps : image:: ViewCapabilities :: empty ( ) ,
15341532 view_kind : image:: ViewKind :: D2Array ,
15351533 format : attachment. dxgi_format ,
1536- component_mapping : IDENTITY_MAPPING ,
1534+ component_mapping : device :: IDENTITY_MAPPING ,
15371535 range : image:: SubresourceRange {
15381536 aspects : if depth. is_some ( ) {
15391537 Aspects :: DEPTH
@@ -1650,17 +1648,17 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
16501648 // Descriptor heap for the current blit, only storing the src image
16511649 let ( srv_heap, _) = device. create_descriptor_heap (
16521650 1 ,
1653- descriptor :: HeapType :: CbvSrvUav ,
1654- descriptor :: HeapFlags :: SHADER_VISIBLE ,
1651+ native :: DescriptorHeapType :: CbvSrvUav ,
1652+ native :: DescriptorHeapFlags :: SHADER_VISIBLE ,
16551653 0 ,
16561654 ) ;
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 {
16581656 resource : src. resource ,
16591657 kind : src. kind ,
16601658 caps : src. view_caps ,
16611659 view_kind : image:: ViewKind :: D2Array , // TODO
16621660 format : src. default_view_format . unwrap ( ) ,
1663- component_mapping : IDENTITY_MAPPING ,
1661+ component_mapping : device :: IDENTITY_MAPPING ,
16641662 range : image:: SubresourceRange {
16651663 aspects : format:: Aspects :: COLOR , // TODO
16661664 levels : 0 .. src. descriptor . MipLevels as _ ,
@@ -1698,7 +1696,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
16981696 // WORKAROUND: renderdoc crashes if we destroy the pool too early
16991697 let rtv_pool = Device :: create_descriptor_heap_impl (
17001698 device,
1701- descriptor :: HeapType :: Rtv ,
1699+ native :: DescriptorHeapType :: Rtv ,
17021700 false ,
17031701 num_layers as _ ,
17041702 ) ;
@@ -2526,7 +2524,7 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
25262524
25272525 unsafe fn begin_query ( & mut self , query : query:: Query < Backend > , flags : query:: ControlFlags ) {
25282526 let query_ty = match query. pool . ty {
2529- native:: query :: HeapType :: Occlusion => {
2527+ native:: QueryHeapType :: Occlusion => {
25302528 if flags. contains ( query:: ControlFlags :: PRECISE ) {
25312529 self . occlusion_query = Some ( OcclusionQuery :: Precise ( query. id ) ) ;
25322530 d3d12:: D3D12_QUERY_TYPE_OCCLUSION
@@ -2537,8 +2535,8 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
25372535 d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION
25382536 }
25392537 }
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 => {
25422540 self . pipeline_stats_query = Some ( query. id ) ;
25432541 d3d12:: D3D12_QUERY_TYPE_PIPELINE_STATISTICS
25442542 }
@@ -2552,19 +2550,19 @@ impl com::CommandBuffer<Backend> for CommandBuffer {
25522550 unsafe fn end_query ( & mut self , query : query:: Query < Backend > ) {
25532551 let id = query. id ;
25542552 let query_ty = match query. pool . ty {
2555- native:: query :: HeapType :: Occlusion
2553+ native:: QueryHeapType :: Occlusion
25562554 if self . occlusion_query == Some ( OcclusionQuery :: Precise ( id) ) =>
25572555 {
25582556 self . occlusion_query = None ;
25592557 d3d12:: D3D12_QUERY_TYPE_OCCLUSION
25602558 }
2561- native:: query :: HeapType :: Occlusion
2559+ native:: QueryHeapType :: Occlusion
25622560 if self . occlusion_query == Some ( OcclusionQuery :: Binary ( id) ) =>
25632561 {
25642562 self . occlusion_query = None ;
25652563 d3d12:: D3D12_QUERY_TYPE_BINARY_OCCLUSION
25662564 }
2567- native:: query :: HeapType :: PipelineStatistics
2565+ native:: QueryHeapType :: PipelineStatistics
25682566 if self . pipeline_stats_query == Some ( id) =>
25692567 {
25702568 self . pipeline_stats_query = None ;
0 commit comments