| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#ifndef GPTIN_DRIVER_COMMON_H |
| 10 |
#define GPTIN_DRIVER_COMMON_H |
| 11 |
|
| 12 |
#include <stdint.h> |
| 13 |
|
| 14 |
#ifdef _WIN32 |
| 15 |
#define GTPIN_DRIVER_CALLCONV __fastcall |
| 16 |
#else |
| 17 |
#define GTPIN_DRIVER_CALLCONV |
| 18 |
#endif |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
namespace gtpin { |
| 24 |
|
| 25 |
|
| 26 |
static const uint16_t GTPIN_COMMON_INTERFACE_VERSION = 6; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
typedef struct resource_handle_s *resource_handle_t; |
| 40 |
typedef struct device_handle_s *device_handle_t; |
| 41 |
typedef device_handle_t context_handle_t; |
| 42 |
typedef struct igc_init_s igc_init_t; |
| 43 |
typedef struct igc_info_s igc_info_t; |
| 44 |
|
| 45 |
typedef struct interface_version_s { |
| 46 |
uint16_t specific; |
| 47 |
uint16_t common; |
| 48 |
} interface_version_t; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
typedef enum { |
| 54 |
GTPIN_GEN_INVALID, |
| 55 |
GTPIN_GEN_8, |
| 56 |
GTPIN_GEN_9, |
| 57 |
GTPIN_GEN_10, |
| 58 |
GTPIN_GEN_11, |
| 59 |
GTPIN_GEN_12_1, |
| 60 |
GTPIN_XEHP_CORE, |
| 61 |
GTPIN_XE_HPG_CORE, |
| 62 |
GTPIN_XE_HPC_CORE = GTPIN_XE_HPG_CORE, |
| 63 |
} GTPIN_GEN_VERSION; |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
typedef enum { |
| 69 |
GTPIN_DI_SUCCESS = 0, |
| 70 |
GTPIN_DI_ERROR_INVALID_ARGUMENT, |
| 71 |
GTPIN_DI_ERROR_NO_INSTANCE, |
| 72 |
GTPIN_DI_ERROR_INSTANCE_ALREADY_CREATED, |
| 73 |
GTPIN_DI_ERROR_ALLOCATION_FAILED, |
| 74 |
GTPIN_DI_ERROR_NO_VIRTUAL_ADDRESS_TO_BUFFER, |
| 75 |
GTPIN_DI_FAIL, |
| 76 |
} GTPIN_DI_STATUS; |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
typedef enum { |
| 82 |
GTPIN_KERNEL_TYPE_INVALID, |
| 83 |
GTPIN_KERNEL_TYPE_HS, |
| 84 |
GTPIN_KERNEL_TYPE_DS, |
| 85 |
GTPIN_KERNEL_TYPE_VS, |
| 86 |
GTPIN_KERNEL_TYPE_PS, |
| 87 |
GTPIN_KERNEL_TYPE_CS, |
| 88 |
GTPIN_KERNEL_TYPE_GS |
| 89 |
} GTPIN_KERNEL_TYPE; |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
typedef enum { |
| 95 |
GTPIN_SIMD_INVALID, |
| 96 |
GTPIN_SIMD_4x2 = 4, |
| 97 |
GTPIN_SIMD_8 = 8, |
| 98 |
GTPIN_SIMD_16 = 16, |
| 99 |
GTPIN_SIMD_32 = 32 |
| 100 |
} GTPIN_SIMD_WIDTH; |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
typedef enum { |
| 106 |
GFX_OPENCL, |
| 107 |
GFX_CM, |
| 108 |
} GFX_TARGET; |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
typedef struct platform_info_s { |
| 114 |
GTPIN_GEN_VERSION gen_version; |
| 115 |
uint32_t device_id; |
| 116 |
} platform_info_t; |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
typedef struct driver_info_s { |
| 122 |
interface_version_t version; |
| 123 |
GFX_TARGET gfx_target; |
| 124 |
} driver_info_t; |
| 125 |
|
| 126 |
} |
| 127 |
#endif |