1 /* 2 * Copyright (C) 2018-2021 Intel Corporation 3 * 4 * SPDX-License-Identifier: MIT 5 * 6 */ 7 8 #pragma once 9 #if _WIN32 10 #include <windows.h> 11 12 #include <winternl.h> 13 14 #pragma warning(push) 15 #pragma warning(disable : 4005) 16 #include <ntstatus.h> 17 #pragma warning(pop) 18 // There is a conflict with max/min defined as macro in windows headers with std::max/std::min 19 #undef min 20 #undef max 21 #undef RegOpenKeyExA 22 #undef RegQueryValueExA 23 #pragma warning(disable : 4273) 24 #else 25 #include <cstdint> 26 #if __clang__ 27 #pragma clang diagnostic push 28 #pragma clang diagnostic ignored "-Wunused-value" 29 #endif 30 31 #include <winadapter.h> 32 33 #if __clang__ 34 #pragma clang diagnostic pop 35 #endif 36 #include <x86intrin.h> 37 38 #define STATUS_GRAPHICS_NO_VIDEO_MEMORY ((NTSTATUS)0xC01E0100L) 39 40 #define PAGE_NOACCESS 0x01 41 #define PAGE_READWRITE 0x04 42 #define MEM_COMMIT 0x00001000 43 #define MEM_RESERVE 0x00002000 44 #define MEM_TOP_DOWN 0x00100000 45 #define MEM_RELEASE 0x00008000 46 #define MEM_FREE 0x00010000 47 48 #define DXGI_RESOURCE_PRIORITY_NORMAL 0x78000000 49 #define DXGI_RESOURCE_PRIORITY_HIGH 0xa0000000 50 #define DXGI_RESOURCE_PRIORITY_MAXIMUM 0xc8000000 51 #endif 52 53 #define NULL_HANDLE 0U 54