1 // Copyright © 2015; Dmitry Roschin 2 // Licensed under the MIT License <LICENSE.md> 3 //! Mappings for the contents of dxgi1_4.h 4 5 ENUM!{ enum DXGI_MEMORY_SEGMENT_GROUP { 6 DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0, 7 DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1, 8 }} 9 10 FLAGS!{ enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG { 11 DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, 12 }} 13 14 FLAGS!{ enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG { 15 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, 16 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2, 17 }} 18 19 STRUCT!{struct DXGI_QUERY_VIDEO_MEMORY_INFO { 20 Budget: ::UINT64, 21 CurrentUsage: ::UINT64, 22 AvailableForReservation: ::UINT64, 23 CurrentReservation: ::UINT64, 24 }} 25 26 RIDL!( 27 interface IDXGIAdapter3(IDXGIAdapter3Vtbl): IDXGIAdapter2(IDXGIAdapter2Vtbl) { 28 fn RegisterHardwareContentProtectionTeardownStatusEvent( 29 &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD 30 ) -> ::HRESULT, 31 fn UnregisterHardwareContentProtectionTeardownStatus( 32 &mut self, dwCookie: ::DWORD 33 ) -> (), 34 fn QueryVideoMemoryInfo( 35 &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP, 36 pVideoMemoryInfo: *mut ::DXGI_QUERY_VIDEO_MEMORY_INFO 37 ) -> ::HRESULT, 38 fn SetVideoMemoryReservation( 39 &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP, 40 Reservation: ::UINT64 41 ) -> ::HRESULT, 42 fn RegisterVideoMemoryBudgetChangeNotificationEvent( 43 &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD 44 ) -> ::HRESULT, 45 fn UnregisterVideoMemoryBudgetChangeNotification( 46 &mut self, dwCookie: ::DWORD 47 ) -> () 48 }); 49 50 RIDL!( 51 interface IDXGIFactory4(IDXGIFactory4Vtbl): IDXGIFactory3(IDXGIFactory3Vtbl) { 52 fn EnumAdapterByLuid( 53 &mut self, AdapterLuid: ::LUID, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void 54 ) -> ::HRESULT, 55 fn EnumWarpAdapter( 56 &mut self, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void 57 ) -> ::HRESULT 58 }); 59 60 RIDL!( 61 interface IDXGIOutput4(IDXGIOutput4Vtbl): IDXGIOutput3(IDXGIOutput3Vtbl) { 62 fn CheckOverlayColorSpaceSupport( 63 &mut self, Format: ::DXGI_FORMAT, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, 64 pConcernedDevice: *mut ::IUnknown, pFlags: *mut ::UINT 65 ) -> ::HRESULT 66 }); 67 68 RIDL!( 69 interface IDXGISwapChain3(IDXGISwapChain3Vtbl): IDXGISwapChain2(IDXGISwapChain2Vtbl) { 70 fn GetCurrentBackBufferIndex(&mut self) -> ::UINT, 71 fn CheckColorSpaceSupport( 72 &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, pColorSpaceSupport: *mut ::UINT 73 ) -> ::HRESULT, 74 fn SetColorSpace1( 75 &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE 76 ) -> ::HRESULT, 77 fn ResizeBuffers1( 78 &mut self, BufferCount: ::UINT, Width: ::UINT, Height: ::UINT, Format: ::DXGI_FORMAT, 79 SwapChainFlags: ::UINT, pCreationNodeMask: *const ::UINT, 80 ppPresentQueue: *mut *mut ::IUnknown 81 ) -> ::HRESULT 82 }); 83