Merge branch 'master' of https://github.com/hashcat/hashcat
This commit is contained in:
@@ -9,18 +9,19 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
static const char CL_VENDOR_AMD1[] = "Advanced Micro Devices, Inc.";
|
||||
static const char CL_VENDOR_AMD2[] = "AuthenticAMD";
|
||||
static const char CL_VENDOR_AMD_USE_INTEL[] = "GenuineIntel";
|
||||
static const char CL_VENDOR_APPLE[] = "Apple";
|
||||
static const char CL_VENDOR_APPLE_USE_AMD[] = "AMD";
|
||||
static const char CL_VENDOR_APPLE_USE_NV[] = "NVIDIA";
|
||||
static const char CL_VENDOR_APPLE_USE_INTEL[] = "Intel Inc.";
|
||||
static const char CL_VENDOR_INTEL_BEIGNET[] = "Intel";
|
||||
static const char CL_VENDOR_INTEL_SDK[] = "Intel(R) Corporation";
|
||||
static const char CL_VENDOR_MESA[] = "Mesa";
|
||||
static const char CL_VENDOR_NV[] = "NVIDIA Corporation";
|
||||
static const char CL_VENDOR_POCL[] = "The pocl project";
|
||||
static const char CL_VENDOR_AMD1[] = "Advanced Micro Devices, Inc.";
|
||||
static const char CL_VENDOR_AMD2[] = "AuthenticAMD";
|
||||
static const char CL_VENDOR_AMD_USE_INTEL[] = "GenuineIntel";
|
||||
static const char CL_VENDOR_APPLE[] = "Apple";
|
||||
static const char CL_VENDOR_APPLE_USE_AMD[] = "AMD";
|
||||
static const char CL_VENDOR_APPLE_USE_NV[] = "NVIDIA";
|
||||
static const char CL_VENDOR_APPLE_USE_INTEL[] = "Intel";
|
||||
static const char CL_VENDOR_APPLE_USE_INTEL2[] = "Intel Inc.";
|
||||
static const char CL_VENDOR_INTEL_BEIGNET[] = "Intel";
|
||||
static const char CL_VENDOR_INTEL_SDK[] = "Intel(R) Corporation";
|
||||
static const char CL_VENDOR_MESA[] = "Mesa";
|
||||
static const char CL_VENDOR_NV[] = "NVIDIA Corporation";
|
||||
static const char CL_VENDOR_POCL[] = "The pocl project";
|
||||
|
||||
int cuda_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void cuda_close (hashcat_ctx_t *hashcat_ctx);
|
||||
@@ -87,55 +88,49 @@ int hc_cuLinkAddData (hashcat_ctx_t *hashcat_ctx, CUlinkState state,
|
||||
int hc_cuLinkDestroy (hashcat_ctx_t *hashcat_ctx, CUlinkState state);
|
||||
int hc_cuLinkComplete (hashcat_ctx_t *hashcat_ctx, CUlinkState state, void **cubinOut, size_t *sizeOut);
|
||||
|
||||
int hc_nvrtcCreateProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram *prog, const char *src, const char *name, int numHeaders, const char * const *headers, const char * const *includeNames);
|
||||
int hc_nvrtcDestroyProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram *prog);
|
||||
int hc_nvrtcCompileProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, int numOptions, const char * const *options);
|
||||
int hc_nvrtcGetProgramLogSize (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, size_t *logSizeRet);
|
||||
int hc_nvrtcGetProgramLog (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, char *log);
|
||||
int hc_nvrtcGetPTXSize (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, size_t *ptxSizeRet);
|
||||
int hc_nvrtcGetPTX (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, char *ptx);
|
||||
int hc_nvrtcVersion (hashcat_ctx_t *hashcat_ctx, int *major, int *minor);
|
||||
int hc_hipCreateProgram (hashcat_ctx_t *hashcat_ctx, hiprtcProgram *prog, const char *src, const char *name, int numHeaders, const char * const *headers, const char * const *includeNames);
|
||||
int hc_hipDestroyProgram (hashcat_ctx_t *hashcat_ctx, hiprtcProgram *prog);
|
||||
int hc_hipCompileProgram (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, int numOptions, const char * const *options);
|
||||
int hc_hipGetProgramLogSize (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, size_t *logSizeRet);
|
||||
int hc_hipGetProgramLog (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, char *log);
|
||||
int hc_hipGetCodeSize (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, size_t *codeSizeRet);
|
||||
int hc_hipGetCode (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, char *code);
|
||||
|
||||
int hc_hipCtxCreate (hashcat_ctx_t *hashcat_ctx, HIPcontext *pctx, unsigned int flags, HIPdevice dev);
|
||||
int hc_hipCtxDestroy (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
|
||||
int hc_hipCtxSetCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
|
||||
int hc_hipCtxSetCacheConfig (hashcat_ctx_t *hashcat_ctx, HIPfunc_cache config);
|
||||
int hc_hipCtxCreate (hashcat_ctx_t *hashcat_ctx, hipCtx_t *pctx, unsigned int flags, hipDevice_t dev);
|
||||
int hc_hipCtxDestroy (hashcat_ctx_t *hashcat_ctx, hipCtx_t ctx);
|
||||
int hc_hipCtxPopCurrent (hashcat_ctx_t *hashcat_ctx, hipCtx_t *pctx);
|
||||
int hc_hipCtxPushCurrent (hashcat_ctx_t *hashcat_ctx, hipCtx_t ctx);
|
||||
int hc_hipCtxSetCurrent (hashcat_ctx_t *hashcat_ctx, hipCtx_t ctx);
|
||||
int hc_hipCtxSynchronize (hashcat_ctx_t *hashcat_ctx);
|
||||
int hc_hipDeviceGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, HIPdevice_attribute attrib, HIPdevice dev);
|
||||
int hc_hipDeviceGet (hashcat_ctx_t *hashcat_ctx, hipDevice_t *device, int ordinal);
|
||||
int hc_hipDeviceGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, hipDeviceAttribute_t attrib, hipDevice_t dev);
|
||||
int hc_hipDeviceGetCount (hashcat_ctx_t *hashcat_ctx, int *count);
|
||||
int hc_hipDeviceGet (hashcat_ctx_t *hashcat_ctx, HIPdevice *device, int ordinal);
|
||||
int hc_hipDeviceGetName (hashcat_ctx_t *hashcat_ctx, char *name, int len, HIPdevice dev);
|
||||
int hc_hipDeviceTotalMem (hashcat_ctx_t *hashcat_ctx, size_t *bytes, HIPdevice dev);
|
||||
int hc_hipDeviceGetName (hashcat_ctx_t *hashcat_ctx, char *name, int len, hipDevice_t dev);
|
||||
int hc_hipDeviceTotalMem (hashcat_ctx_t *hashcat_ctx, size_t *bytes, hipDevice_t dev);
|
||||
int hc_hipDriverGetVersion (hashcat_ctx_t *hashcat_ctx, int *driverVersion);
|
||||
int hc_hipEventCreate (hashcat_ctx_t *hashcat_ctx, HIPevent *phEvent, unsigned int Flags);
|
||||
int hc_hipEventDestroy (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
|
||||
int hc_hipEventElapsedTime (hashcat_ctx_t *hashcat_ctx, float *pMilliseconds, HIPevent hStart, HIPevent hEnd);
|
||||
int hc_hipEventQuery (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
|
||||
int hc_hipEventRecord (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent, HIPstream hStream);
|
||||
int hc_hipEventSynchronize (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
|
||||
int hc_hipFuncGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, HIPfunction_attribute attrib, HIPfunction hfunc);
|
||||
//int hc_hipFuncSetAttribute (hashcat_ctx_t *hashcat_ctx, HIPfunction hfunc, HIPfunction_attribute attrib, int value);
|
||||
int hc_hipEventCreate (hashcat_ctx_t *hashcat_ctx, hipEvent_t *phEvent, unsigned int Flags);
|
||||
int hc_hipEventDestroy (hashcat_ctx_t *hashcat_ctx, hipEvent_t hEvent);
|
||||
int hc_hipEventElapsedTime (hashcat_ctx_t *hashcat_ctx, float *pMilliseconds, hipEvent_t hStart, hipEvent_t hEnd);
|
||||
int hc_hipEventQuery (hashcat_ctx_t *hashcat_ctx, hipEvent_t hEvent);
|
||||
int hc_hipEventRecord (hashcat_ctx_t *hashcat_ctx, hipEvent_t hEvent, hipStream_t hStream);
|
||||
int hc_hipEventSynchronize (hashcat_ctx_t *hashcat_ctx, hipEvent_t hEvent);
|
||||
int hc_hipFuncGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, hipFunction_attribute attrib, hipFunction_t hfunc);
|
||||
int hc_hipInit (hashcat_ctx_t *hashcat_ctx, unsigned int Flags);
|
||||
int hc_hipLaunchKernel (hashcat_ctx_t *hashcat_ctx, HIPfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, HIPstream hStream, void **kernelParams, void **extra);
|
||||
int hc_hipMemAlloc (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr *dptr, size_t bytesize);
|
||||
int hc_hipMemcpyDtoDAsync (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, HIPdeviceptr srcDevice, size_t ByteCount, HIPstream hStream);
|
||||
int hc_hipMemcpyDtoHAsync (hashcat_ctx_t *hashcat_ctx, void *dstHost, HIPdeviceptr srcDevice, size_t ByteCount, HIPstream hStream);
|
||||
int hc_hipMemcpyHtoDAsync (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, const void *srcHost, size_t ByteCount, HIPstream hStream);
|
||||
int hc_hipMemFree (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dptr);
|
||||
int hc_hipMemsetD32Async (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, unsigned int ui, size_t N, HIPstream hStream);
|
||||
int hc_hipMemsetD8Async (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, unsigned char uc, size_t N, HIPstream hStream);
|
||||
int hc_hipModuleGetFunction (hashcat_ctx_t *hashcat_ctx, HIPfunction *hfunc, HIPmodule hmod, const char *name);
|
||||
int hc_hipModuleLoadDataEx (hashcat_ctx_t *hashcat_ctx, HIPmodule *module, const void *image, unsigned int numOptions, HIPjit_option *options, void **optionValues);
|
||||
int hc_hipModuleUnload (hashcat_ctx_t *hashcat_ctx, HIPmodule hmod);
|
||||
int hc_hipStreamCreate (hashcat_ctx_t *hashcat_ctx, HIPstream *phStream, unsigned int Flags);
|
||||
int hc_hipStreamDestroy (hashcat_ctx_t *hashcat_ctx, HIPstream hStream);
|
||||
int hc_hipStreamSynchronize (hashcat_ctx_t *hashcat_ctx, HIPstream hStream);
|
||||
int hc_hipCtxPushCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
|
||||
int hc_hipCtxPopCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext *pctx);
|
||||
int hc_hipLinkCreate (hashcat_ctx_t *hashcat_ctx, unsigned int numOptions, HIPjit_option *options, void **optionValues, HIPlinkState *stateOut);
|
||||
int hc_hipLinkAddData (hashcat_ctx_t *hashcat_ctx, HIPlinkState state, HIPjitInputType type, void *data, size_t size, const char *name, unsigned int numOptions, HIPjit_option *options, void **optionValues);
|
||||
int hc_hipLinkDestroy (hashcat_ctx_t *hashcat_ctx, HIPlinkState state);
|
||||
int hc_hipLinkComplete (hashcat_ctx_t *hashcat_ctx, HIPlinkState state, void **cubinOut, size_t *sizeOut);
|
||||
int hc_hipLaunchKernel (hashcat_ctx_t *hashcat_ctx, hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hipStream_t hStream, void **kernelParams, void **extra);
|
||||
int hc_hipMemAlloc (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t *dptr, size_t bytesize);
|
||||
int hc_hipMemFree (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t dptr);
|
||||
int hc_hipMemcpyDtoDAsync (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t dstDevice, hipDeviceptr_t srcDevice, size_t ByteCount, hipStream_t hStream);
|
||||
int hc_hipMemcpyDtoHAsync (hashcat_ctx_t *hashcat_ctx, void *dstHost, hipDeviceptr_t srcDevice, size_t ByteCount, hipStream_t hStream);
|
||||
int hc_hipMemcpyHtoDAsync (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t dstDevice, const void *srcHost, size_t ByteCount, hipStream_t hStream);
|
||||
int hc_hipMemsetD32Async (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t dstDevice, unsigned int ui, size_t N, hipStream_t hStream);
|
||||
int hc_hipMemsetD8Async (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t dstDevice, unsigned char uc, size_t N, hipStream_t hStream);
|
||||
int hc_hipModuleGetFunction (hashcat_ctx_t *hashcat_ctx, hipFunction_t *hfunc, hipModule_t hmod, const char *name);
|
||||
int hc_hipModuleGetGlobal (hashcat_ctx_t *hashcat_ctx, hipDeviceptr_t *dptr, size_t *bytes, hipModule_t hmod, const char *name);
|
||||
int hc_hipModuleLoadDataEx (hashcat_ctx_t *hashcat_ctx, hipModule_t *module, const void *image, unsigned int numOptions, hipJitOption *options, void **optionValues);
|
||||
int hc_hipModuleUnload (hashcat_ctx_t *hashcat_ctx, hipModule_t hmod);
|
||||
int hc_hipStreamCreate (hashcat_ctx_t *hashcat_ctx, hipStream_t *phStream, unsigned int Flags);
|
||||
int hc_hipStreamDestroy (hashcat_ctx_t *hashcat_ctx, hipStream_t hStream);
|
||||
int hc_hipStreamSynchronize (hashcat_ctx_t *hashcat_ctx, hipStream_t hStream);
|
||||
|
||||
int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
|
||||
int hc_clCompileProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, cl_uint num_input_headers, const cl_program *input_headers, const char **header_include_names, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
|
||||
@@ -186,11 +181,11 @@ int run_cuda_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param
|
||||
int run_cuda_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 offset, const u32 value, const u64 size);
|
||||
int run_cuda_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 size);
|
||||
|
||||
int run_hip_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 num);
|
||||
int run_hip_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 num);
|
||||
int run_hip_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 offset, const u8 value, const u64 size);
|
||||
int run_hip_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 offset, const u32 value, const u64 size);
|
||||
int run_hip_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 size);
|
||||
int run_hip_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 num);
|
||||
int run_hip_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 num);
|
||||
int run_hip_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 offset, const u8 value, const u64 size);
|
||||
int run_hip_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 offset, const u32 value, const u64 size);
|
||||
int run_hip_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 size);
|
||||
|
||||
int run_opencl_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 num);
|
||||
int run_opencl_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 num);
|
||||
|
||||
@@ -13,228 +13,569 @@
|
||||
#include <windows.h>
|
||||
#endif // _WIN
|
||||
|
||||
// Declarations from:
|
||||
// https://github.com/GPUOpen-LibrariesAndSDKs/display-library/blob/209538e1dc7273f7459411a3a5044ffe2437ed95/include/adl_defines.h
|
||||
// https://github.com/GPUOpen-LibrariesAndSDKs/display-library/blob/209538e1dc7273f7459411a3a5044ffe2437ed95/include/adl_structures.h
|
||||
|
||||
|
||||
/// Defines ADL_TRUE
|
||||
#define ADL_TRUE 1
|
||||
/// Defines ADL_FALSE
|
||||
#define ADL_FALSE 0
|
||||
|
||||
//Define Performance Metrics Log max sensors number
|
||||
#define ADL_PMLOG_MAX_SENSORS 256
|
||||
|
||||
typedef enum ADLSensorType
|
||||
{
|
||||
SENSOR_MAXTYPES = 0,
|
||||
PMLOG_CLK_GFXCLK = 1,
|
||||
PMLOG_CLK_MEMCLK = 2,
|
||||
PMLOG_CLK_SOCCLK = 3,
|
||||
PMLOG_CLK_UVDCLK1 = 4,
|
||||
PMLOG_CLK_UVDCLK2 = 5,
|
||||
PMLOG_CLK_VCECLK = 6,
|
||||
PMLOG_CLK_VCNCLK = 7,
|
||||
PMLOG_TEMPERATURE_EDGE = 8,
|
||||
PMLOG_TEMPERATURE_MEM = 9,
|
||||
PMLOG_TEMPERATURE_VRVDDC = 10,
|
||||
PMLOG_TEMPERATURE_VRMVDD = 11,
|
||||
PMLOG_TEMPERATURE_LIQUID = 12,
|
||||
PMLOG_TEMPERATURE_PLX = 13,
|
||||
PMLOG_FAN_RPM = 14,
|
||||
PMLOG_FAN_PERCENTAGE = 15,
|
||||
PMLOG_SOC_VOLTAGE = 16,
|
||||
PMLOG_SOC_POWER = 17,
|
||||
PMLOG_SOC_CURRENT = 18,
|
||||
PMLOG_INFO_ACTIVITY_GFX = 19,
|
||||
PMLOG_INFO_ACTIVITY_MEM = 20,
|
||||
PMLOG_GFX_VOLTAGE = 21,
|
||||
PMLOG_MEM_VOLTAGE = 22,
|
||||
PMLOG_ASIC_POWER = 23,
|
||||
PMLOG_TEMPERATURE_VRSOC = 24,
|
||||
PMLOG_TEMPERATURE_VRMVDD0 = 25,
|
||||
PMLOG_TEMPERATURE_VRMVDD1 = 26,
|
||||
PMLOG_TEMPERATURE_HOTSPOT = 27,
|
||||
PMLOG_TEMPERATURE_GFX = 28,
|
||||
PMLOG_TEMPERATURE_SOC = 29,
|
||||
PMLOG_GFX_POWER = 30,
|
||||
PMLOG_GFX_CURRENT = 31,
|
||||
PMLOG_TEMPERATURE_CPU = 32,
|
||||
PMLOG_CPU_POWER = 33,
|
||||
PMLOG_CLK_CPUCLK = 34,
|
||||
PMLOG_THROTTLER_STATUS = 35,
|
||||
PMLOG_CLK_VCN1CLK1 = 36,
|
||||
PMLOG_CLK_VCN1CLK2 = 37,
|
||||
PMLOG_SMART_POWERSHIFT_CPU = 38,
|
||||
PMLOG_SMART_POWERSHIFT_DGPU = 39,
|
||||
PMLOG_BUS_SPEED = 40,
|
||||
PMLOG_BUS_LANES = 41,
|
||||
PMLOG_MAX_SENSORS_REAL
|
||||
} ADLSensorType;
|
||||
|
||||
/// Defines the maximum string length
|
||||
#define ADL_MAX_CHAR 4096
|
||||
/// Defines the maximum string length
|
||||
#define ADL_MAX_PATH 256
|
||||
/// Defines the maximum number of supported adapters
|
||||
#define ADL_MAX_ADAPTERS 250
|
||||
/// Defines the maxumum number of supported displays
|
||||
#define ADL_MAX_DISPLAYS 150
|
||||
/// Defines the maxumum string length for device name
|
||||
#define ADL_MAX_DEVICENAME 32
|
||||
/// Defines for all adapters
|
||||
#define ADL_ADAPTER_INDEX_ALL -1
|
||||
|
||||
/// \defgroup define_adl_results Result Codes
|
||||
/// This group of definitions are the various results returned by all ADL functions \n
|
||||
/// @{
|
||||
/// All OK, but need to wait
|
||||
#define ADL_OK_WAIT 4
|
||||
/// All OK, but need restart
|
||||
#define ADL_OK_RESTART 3
|
||||
/// All OK but need mode change
|
||||
#define ADL_OK_MODE_CHANGE 2
|
||||
/// All OK, but with warning
|
||||
#define ADL_OK_WARNING 1
|
||||
/// ADL function completed successfully
|
||||
#define ADL_OK 0
|
||||
/// Generic Error. Most likely one or more of the Escape calls to the driver failed!
|
||||
#define ADL_ERR -1
|
||||
/// ADL not initialized
|
||||
#define ADL_ERR_NOT_INIT -2
|
||||
/// One of the parameter passed is invalid
|
||||
#define ADL_ERR_INVALID_PARAM -3
|
||||
/// One of the parameter size is invalid
|
||||
#define ADL_ERR_INVALID_PARAM_SIZE -4
|
||||
/// Invalid ADL index passed
|
||||
#define ADL_ERR_INVALID_ADL_IDX -5
|
||||
/// Invalid controller index passed
|
||||
#define ADL_ERR_INVALID_CONTROLLER_IDX -6
|
||||
/// Invalid display index passed
|
||||
#define ADL_ERR_INVALID_DIPLAY_IDX -7
|
||||
/// Function not supported by the driver
|
||||
#define ADL_ERR_NOT_SUPPORTED -8
|
||||
/// Null Pointer error
|
||||
#define ADL_ERR_NULL_POINTER -9
|
||||
/// Call can't be made due to disabled adapter
|
||||
#define ADL_ERR_DISABLED_ADAPTER -10
|
||||
/// Invalid Callback
|
||||
#define ADL_ERR_INVALID_CALLBACK -11
|
||||
/// Display Resource conflict
|
||||
#define ADL_ERR_RESOURCE_CONFLICT -12
|
||||
//Failed to update some of the values. Can be returned by set request that include multiple values if not all values were successfully committed.
|
||||
#define ADL_ERR_SET_INCOMPLETE -20
|
||||
/// There's no Linux XDisplay in Linux Console environment
|
||||
#define ADL_ERR_NO_XDISPLAY -21
|
||||
|
||||
//values for ADLFanSpeedValue.iSpeedType
|
||||
#define ADL_DL_FANCTRL_SPEED_TYPE_PERCENT 1
|
||||
#define ADL_DL_FANCTRL_SPEED_TYPE_RPM 2
|
||||
|
||||
//values for ADLFanSpeedValue.iFlags
|
||||
#define ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED 1
|
||||
|
||||
/**
|
||||
* Declarations from adl_sdk.h and subheaders
|
||||
* Declarations from adl_structures.h
|
||||
*/
|
||||
|
||||
#define ADL_OK 0
|
||||
#define ADL_ERR -1
|
||||
#define ADL_ERR_NOT_SUPPORTED -8
|
||||
|
||||
#define ADL_MAX_PATH 256
|
||||
|
||||
#define ADL_DL_FANCTRL_SPEED_TYPE_PERCENT 1
|
||||
#define ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED 1
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about the graphics adapter.
|
||||
///
|
||||
/// This structure is used to store various information about the graphics adapter. This
|
||||
/// information can be returned to the user. Alternatively, it can be used to access various driver calls to set
|
||||
/// or fetch various settings upon the user's request.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct AdapterInfo
|
||||
{
|
||||
int iSize;
|
||||
int iAdapterIndex;
|
||||
char strUDID[ADL_MAX_PATH];
|
||||
int iBusNumber;
|
||||
int iDeviceNumber;
|
||||
int iFunctionNumber;
|
||||
int iVendorID;
|
||||
char strAdapterName[ADL_MAX_PATH];
|
||||
char strDisplayName[ADL_MAX_PATH];
|
||||
int iPresent;
|
||||
/// \ALL_STRUCT_MEM
|
||||
|
||||
#if defined (_WIN32) || defined (_WIN64) || defined (__CYGWIN__)
|
||||
int iExist;
|
||||
char strDriverPath[ADL_MAX_PATH];
|
||||
char strDriverPathExt[ADL_MAX_PATH];
|
||||
char strPNPString[ADL_MAX_PATH];
|
||||
int iOSDisplayIndex;
|
||||
#endif /* (_WIN32) || (_WIN64) || (__CYGWIN__) */
|
||||
/// Size of the structure.
|
||||
int iSize;
|
||||
/// The ADL index handle. One GPU may be associated with one or two index handles
|
||||
int iAdapterIndex;
|
||||
/// The unique device ID associated with this adapter.
|
||||
char strUDID[ADL_MAX_PATH];
|
||||
/// The BUS number associated with this adapter.
|
||||
int iBusNumber;
|
||||
/// The driver number associated with this adapter.
|
||||
int iDeviceNumber;
|
||||
/// The function number.
|
||||
int iFunctionNumber;
|
||||
/// The vendor ID associated with this adapter.
|
||||
int iVendorID;
|
||||
/// Adapter name.
|
||||
char strAdapterName[ADL_MAX_PATH];
|
||||
/// Display name. For example, "\\\\Display0" for Windows or ":0:0" for Linux.
|
||||
char strDisplayName[ADL_MAX_PATH];
|
||||
/// Present or not; 1 if present and 0 if not present.It the logical adapter is present, the display name such as \\\\.\\Display1 can be found from OS
|
||||
int iPresent;
|
||||
|
||||
#if defined (__linux__)
|
||||
int iXScreenNum;
|
||||
int iDrvIndex;
|
||||
char strXScreenConfigName[ADL_MAX_PATH];
|
||||
#endif /* (__linux__) */
|
||||
#if defined (_WIN32) || defined (_WIN64)
|
||||
/// \WIN_STRUCT_MEM
|
||||
|
||||
/// Exist or not; 1 is exist and 0 is not present.
|
||||
int iExist;
|
||||
/// Driver registry path.
|
||||
char strDriverPath[ADL_MAX_PATH];
|
||||
/// Driver registry path Ext for.
|
||||
char strDriverPathExt[ADL_MAX_PATH];
|
||||
/// PNP string from Windows.
|
||||
char strPNPString[ADL_MAX_PATH];
|
||||
/// It is generated from EnumDisplayDevices.
|
||||
int iOSDisplayIndex;
|
||||
|
||||
#endif /* (_WIN32) || (_WIN64) */
|
||||
|
||||
#if defined (LINUX)
|
||||
/// \LNX_STRUCT_MEM
|
||||
|
||||
/// Internal X screen number from GPUMapInfo (DEPRICATED use XScreenInfo)
|
||||
int iXScreenNum;
|
||||
/// Internal driver index from GPUMapInfo
|
||||
int iDrvIndex;
|
||||
/// \deprecated Internal x config file screen identifier name. Use XScreenInfo instead.
|
||||
char strXScreenConfigName[ADL_MAX_PATH];
|
||||
|
||||
#endif /* (LINUX) */
|
||||
} AdapterInfo, *LPAdapterInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about thermal controller.
|
||||
///
|
||||
/// This structure is used to store information about thermal controller.
|
||||
/// This structure is used by ADL_PM_ThermalDevices_Enum.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLThermalControllerInfo
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Possible valies: \ref ADL_DL_THERMAL_DOMAIN_OTHER or \ref ADL_DL_THERMAL_DOMAIN_GPU.
|
||||
int iThermalDomain;
|
||||
/// GPU 0, 1, etc.
|
||||
int iDomainIndex;
|
||||
/// Possible valies: \ref ADL_DL_THERMAL_FLAG_INTERRUPT or \ref ADL_DL_THERMAL_FLAG_FANCONTROL
|
||||
int iFlags;
|
||||
} ADLThermalControllerInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about thermal controller temperature.
|
||||
///
|
||||
/// This structure is used to store information about thermal controller temperature.
|
||||
/// This structure is used by the ADL_PM_Temperature_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLTemperature
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Temperature in millidegrees Celsius.
|
||||
int iTemperature;
|
||||
} ADLTemperature;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about thermal controller fan speed.
|
||||
///
|
||||
/// This structure is used to store information about thermal controller fan speed.
|
||||
/// This structure is used by the ADL_PM_FanSpeedInfo_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLFanSpeedInfo
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// \ref define_fanctrl
|
||||
int iFlags;
|
||||
/// Minimum possible fan speed value in percents.
|
||||
int iMinPercent;
|
||||
/// Maximum possible fan speed value in percents.
|
||||
int iMaxPercent;
|
||||
/// Minimum possible fan speed value in RPM.
|
||||
int iMinRPM;
|
||||
/// Maximum possible fan speed value in RPM.
|
||||
int iMaxRPM;
|
||||
} ADLFanSpeedInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about fan speed reported by thermal controller.
|
||||
///
|
||||
/// This structure is used to store information about fan speed reported by thermal controller.
|
||||
/// This structure is used by the ADL_Overdrive5_FanSpeed_Get() and ADL_Overdrive5_FanSpeed_Set() functions.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLFanSpeedValue
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Possible valies: \ref ADL_DL_FANCTRL_SPEED_TYPE_PERCENT or \ref ADL_DL_FANCTRL_SPEED_TYPE_RPM
|
||||
int iSpeedType;
|
||||
/// Fan speed value
|
||||
int iFanSpeed;
|
||||
/// The only flag for now is: \ref ADL_DL_FANCTRL_FLAG_USER_DEFINED_SPEED
|
||||
int iFlags;
|
||||
} ADLFanSpeedValue;
|
||||
|
||||
typedef struct ADLDisplayID
|
||||
{
|
||||
int iDisplayLogicalIndex;
|
||||
int iDisplayPhysicalIndex;
|
||||
int iDisplayLogicalAdapterIndex;
|
||||
int iDisplayPhysicalAdapterIndex;
|
||||
} ADLDisplayID, *LPADLDisplayID;
|
||||
|
||||
typedef struct ADLDisplayInfo
|
||||
{
|
||||
ADLDisplayID displayID;
|
||||
int iDisplayControllerIndex;
|
||||
char strDisplayName[ADL_MAX_PATH];
|
||||
char strDisplayManufacturerName[ADL_MAX_PATH];
|
||||
int iDisplayType;
|
||||
int iDisplayOutputType;
|
||||
int iDisplayConnector;
|
||||
int iDisplayInfoMask;
|
||||
int iDisplayInfoValue;
|
||||
} ADLDisplayInfo, *LPADLDisplayInfo;
|
||||
|
||||
typedef struct ADLBiosInfo
|
||||
{
|
||||
char strPartNumber[ADL_MAX_PATH];
|
||||
char strVersion[ADL_MAX_PATH];
|
||||
char strDate[ADL_MAX_PATH];
|
||||
} ADLBiosInfo, *LPADLBiosInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about current power management related activity.
|
||||
///
|
||||
/// This structure is used to store information about current power management related activity.
|
||||
/// This structure (Overdrive 5 interfaces) is used by the ADL_PM_CurrentActivity_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLPMActivity
|
||||
{
|
||||
int iSize;
|
||||
int iEngineClock;
|
||||
int iMemoryClock;
|
||||
int iVddc;
|
||||
int iActivityPercent;
|
||||
int iCurrentPerformanceLevel;
|
||||
int iCurrentBusSpeed;
|
||||
int iCurrentBusLanes;
|
||||
int iMaximumBusLanes;
|
||||
int iReserved;
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Current engine clock.
|
||||
int iEngineClock;
|
||||
/// Current memory clock.
|
||||
int iMemoryClock;
|
||||
/// Current core voltage.
|
||||
int iVddc;
|
||||
/// GPU utilization.
|
||||
int iActivityPercent;
|
||||
/// Performance level index.
|
||||
int iCurrentPerformanceLevel;
|
||||
/// Current PCIE bus speed.
|
||||
int iCurrentBusSpeed;
|
||||
/// Number of PCIE bus lanes.
|
||||
int iCurrentBusLanes;
|
||||
/// Maximum number of PCIE bus lanes.
|
||||
int iMaximumBusLanes;
|
||||
/// Reserved for future purposes.
|
||||
int iReserved;
|
||||
} ADLPMActivity;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing the range of Overdrive parameter.
|
||||
///
|
||||
/// This structure is used to store information about the range of Overdrive parameter.
|
||||
/// This structure is used by ADLODParameters.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODParameterRange
|
||||
{
|
||||
/// Minimum parameter value.
|
||||
int iMin;
|
||||
/// Maximum parameter value.
|
||||
int iMax;
|
||||
/// Parameter step value.
|
||||
int iStep;
|
||||
} ADLODParameterRange;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive parameters.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive parameters.
|
||||
/// This structure is used by the ADL_Overdrive5_ODParameters_Get() function.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODParameters
|
||||
{
|
||||
/// Must be set to the size of the structure
|
||||
int iSize;
|
||||
/// Number of standard performance states.
|
||||
int iNumberOfPerformanceLevels;
|
||||
/// Indicates whether the GPU is capable to measure its activity.
|
||||
int iActivityReportingSupported;
|
||||
/// Indicates whether the GPU supports discrete performance levels or performance range.
|
||||
int iDiscretePerformanceLevels;
|
||||
/// Reserved for future use.
|
||||
int iReserved;
|
||||
/// Engine clock range.
|
||||
ADLODParameterRange sEngineClock;
|
||||
/// Memory clock range.
|
||||
ADLODParameterRange sMemoryClock;
|
||||
/// Core voltage range.
|
||||
ADLODParameterRange sVddc;
|
||||
} ADLODParameters;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 fan speed information
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 fan speed information
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6FanSpeedInfo
|
||||
{
|
||||
/// Contains a bitmap of the valid fan speed type flags. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM, \ref ADL_OD6_FANSPEED_USER_DEFINED
|
||||
int iSpeedType;
|
||||
/// Contains current fan speed in percent (if valid flag exists in iSpeedType)
|
||||
int iFanSpeedPercent;
|
||||
/// Contains current fan speed in RPM (if valid flag exists in iSpeedType)
|
||||
int iFanSpeedRPM;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6FanSpeedInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 fan speed value
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 fan speed value
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6FanSpeedValue
|
||||
{
|
||||
/// Indicates the units of the fan speed. Possible values: \ref ADL_OD6_FANSPEED_TYPE_PERCENT, \ref ADL_OD6_FANSPEED_TYPE_RPM
|
||||
int iSpeedType;
|
||||
/// Fan speed value (units as indicated above)
|
||||
int iFanSpeed;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6FanSpeedValue;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about current Overdrive 6 performance status.
|
||||
///
|
||||
/// This structure is used to store information about current Overdrive 6 performance status.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6CurrentStatus
|
||||
{
|
||||
/// Current engine clock in 10 KHz.
|
||||
int iEngineClock;
|
||||
/// Current memory clock in 10 KHz.
|
||||
int iMemoryClock;
|
||||
/// Current GPU activity in percent. This
|
||||
/// indicates how "busy" the GPU is.
|
||||
int iActivityPercent;
|
||||
/// Not used. Reserved for future use.
|
||||
int iCurrentPerformanceLevel;
|
||||
/// Current PCI-E bus speed
|
||||
int iCurrentBusSpeed;
|
||||
/// Current PCI-E bus # of lanes
|
||||
int iCurrentBusLanes;
|
||||
/// Maximum possible PCI-E bus # of lanes
|
||||
int iMaximumBusLanes;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6CurrentStatus;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 clock range
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 clock range
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6ParameterRange
|
||||
{
|
||||
/// The starting value of the clock range
|
||||
int iMin;
|
||||
/// The ending value of the clock range
|
||||
int iMax;
|
||||
/// The minimum increment between clock values
|
||||
int iStep;
|
||||
|
||||
} ADLOD6ParameterRange;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 capabilities
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 capabilities
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6Capabilities
|
||||
{
|
||||
/// Contains a bitmap of the OD6 capability flags. Possible values: \ref ADL_OD6_CAPABILITY_SCLK_CUSTOMIZATION,
|
||||
/// \ref ADL_OD6_CAPABILITY_MCLK_CUSTOMIZATION, \ref ADL_OD6_CAPABILITY_GPU_ACTIVITY_MONITOR
|
||||
int iCapabilities;
|
||||
/// Contains a bitmap indicating the power states
|
||||
/// supported by OD6. Currently only the performance state
|
||||
/// is supported. Possible Values: \ref ADL_OD6_SUPPORTEDSTATE_PERFORMANCE
|
||||
int iSupportedStates;
|
||||
/// Number of levels. OD6 will always use 2 levels, which describe
|
||||
/// the minimum to maximum clock ranges.
|
||||
/// The 1st level indicates the minimum clocks, and the 2nd level
|
||||
/// indicates the maximum clocks.
|
||||
int iNumberOfPerformanceLevels;
|
||||
/// Contains the hard limits of the sclk range. Overdrive
|
||||
/// clocks cannot be set outside this range.
|
||||
ADLOD6ParameterRange sEngineClockRange;
|
||||
/// Contains the hard limits of the mclk range. Overdrive
|
||||
/// clocks cannot be set outside this range.
|
||||
ADLOD6ParameterRange sMemoryClockRange;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
} ADLOD6Capabilities;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive level.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive level.
|
||||
/// This structure is used by ADLODPerformanceLevels.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODPerformanceLevel
|
||||
{
|
||||
/// Engine clock.
|
||||
int iEngineClock;
|
||||
/// Memory clock.
|
||||
int iMemoryClock;
|
||||
/// Core voltage.
|
||||
int iVddc;
|
||||
} ADLODPerformanceLevel;
|
||||
|
||||
/*
|
||||
* Attention: we had to change this struct due to an out-of-bound problem mentioned here:
|
||||
* https://github.com/hashcat/hashcat/issues/244
|
||||
* the change: ADLODPerformanceLevel aLevels [1] -> ADLODPerformanceLevel aLevels [2]
|
||||
*/
|
||||
|
||||
typedef struct ADLODPerformanceLevels
|
||||
{
|
||||
int iSize;
|
||||
int iReserved;
|
||||
ADLODPerformanceLevel aLevels [2];
|
||||
} ADLODPerformanceLevels;
|
||||
|
||||
typedef struct ADLOD6FanSpeedInfo
|
||||
{
|
||||
int iSpeedType;
|
||||
int iFanSpeedPercent;
|
||||
int iFanSpeedRPM;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6FanSpeedInfo;
|
||||
|
||||
typedef struct ADLOD6FanSpeedValue
|
||||
{
|
||||
int iSpeedType;
|
||||
int iFanSpeed;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6FanSpeedValue;
|
||||
|
||||
typedef struct ADLOD6CurrentStatus
|
||||
{
|
||||
int iEngineClock;
|
||||
int iMemoryClock;
|
||||
int iActivityPercent;
|
||||
int iCurrentPerformanceLevel;
|
||||
int iCurrentBusSpeed;
|
||||
int iCurrentBusLanes;
|
||||
int iMaximumBusLanes;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6CurrentStatus;
|
||||
|
||||
typedef struct ADLOD6ParameterRange
|
||||
{
|
||||
int iMin;
|
||||
int iMax;
|
||||
int iStep;
|
||||
} ADLOD6ParameterRange;
|
||||
|
||||
typedef struct ADLOD6Capabilities
|
||||
{
|
||||
int iCapabilities;
|
||||
int iSupportedStates;
|
||||
int iNumberOfPerformanceLevels;
|
||||
ADLOD6ParameterRange sEngineClockRange;
|
||||
ADLOD6ParameterRange sMemoryClockRange;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
} ADLOD6Capabilities;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 clock values.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 clock values.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6PerformanceLevel
|
||||
{
|
||||
int iEngineClock;
|
||||
int iMemoryClock;
|
||||
/// Engine (core) clock.
|
||||
int iEngineClock;
|
||||
/// Memory clock.
|
||||
int iMemoryClock;
|
||||
|
||||
} ADLOD6PerformanceLevel;
|
||||
|
||||
/*
|
||||
* Attention: we had to change this struct due to an out-of-bound problem mentioned here:
|
||||
* https://github.com/hashcat/hashcat/issues/244
|
||||
* the change: ADLOD6PerformanceLevel aLevels [1] -> ADLOD6PerformanceLevel aLevels [2]
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive 6 clocks.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive 6 clocks. This is a
|
||||
/// variable-sized structure. iNumberOfPerformanceLevels indicate how many elements
|
||||
/// are contained in the aLevels array.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLOD6StateInfo
|
||||
{
|
||||
int iNumberOfPerformanceLevels;
|
||||
int iExtValue;
|
||||
int iExtMask;
|
||||
ADLOD6PerformanceLevel aLevels [2];
|
||||
/// Number of levels. OD6 uses clock ranges instead of discrete performance levels.
|
||||
/// iNumberOfPerformanceLevels is always 2. The 1st level indicates the minimum clocks
|
||||
/// in the range. The 2nd level indicates the maximum clocks in the range.
|
||||
int iNumberOfPerformanceLevels;
|
||||
|
||||
/// Value for future extension
|
||||
int iExtValue;
|
||||
/// Mask for future extension
|
||||
int iExtMask;
|
||||
|
||||
/// Variable-sized array of levels.
|
||||
/// The number of elements in the array is specified by iNumberofPerformanceLevels.
|
||||
ADLOD6PerformanceLevel aLevels [1];
|
||||
|
||||
} ADLOD6StateInfo;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Overdrive performance levels.
|
||||
///
|
||||
/// This structure is used to store information about Overdrive performance levels.
|
||||
/// This structure is used by the ADL_Overdrive5_ODPerformanceLevels_Get() and ADL_Overdrive5_ODPerformanceLevels_Set() functions.
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLODPerformanceLevels
|
||||
{
|
||||
/// Must be set to sizeof( \ref ADLODPerformanceLevels ) + sizeof( \ref ADLODPerformanceLevel ) * (ADLODParameters.iNumberOfPerformanceLevels - 1)
|
||||
int iSize;
|
||||
int iReserved;
|
||||
/// Array of performance state descriptors. Must have ADLODParameters.iNumberOfPerformanceLevels elements.
|
||||
ADLODPerformanceLevel aLevels [1];
|
||||
} ADLODPerformanceLevels;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///\brief Structure containing information about Performance Metrics data
|
||||
///
|
||||
/// This structure is used to store information about Performance Metrics data output
|
||||
/// \nosubgrouping
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct ADLSingleSensorData
|
||||
{
|
||||
int supported;
|
||||
int value;
|
||||
} ADLSingleSensorData;
|
||||
|
||||
typedef struct ADLPMLogDataOutput
|
||||
{
|
||||
int size;
|
||||
ADLSingleSensorData sensors[ADL_PMLOG_MAX_SENSORS];
|
||||
}ADLPMLogDataOutput;
|
||||
|
||||
/// \brief Handle to ADL client context.
|
||||
///
|
||||
/// ADL clients obtain context handle from initial call to \ref ADL2_Main_Control_Create.
|
||||
/// Clients have to pass the handle to each subsequent ADL call and finally destroy
|
||||
/// the context with call to \ref ADL2_Main_Control_Destroy
|
||||
/// \nosubgrouping
|
||||
typedef void *ADL_CONTEXT_HANDLE;
|
||||
|
||||
#if defined (__MSC_VER)
|
||||
#define ADL_API_CALL __cdecl
|
||||
#elif defined (_WIN32) || defined (__WIN32__)
|
||||
@@ -251,62 +592,51 @@ typedef void* (ADL_API_CALL *ADL_MAIN_MALLOC_CALLBACK )( int );
|
||||
|
||||
typedef int HM_ADAPTER_ADL;
|
||||
|
||||
typedef struct struct_ADLOD6MemClockState
|
||||
{
|
||||
ADLOD6StateInfo state;
|
||||
ADLOD6PerformanceLevel level;
|
||||
|
||||
} ADLOD6MemClockState;
|
||||
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_DESTROY) (void);
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_CREATE) (ADL_MAIN_MALLOC_CALLBACK, int);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_NUMBEROFADAPTERS_GET) (int *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ADAPTERINFO_GET) (LPAdapterInfo, int);
|
||||
typedef int (ADL_API_CALL *ADL_DISPLAY_DISPLAYINFO_GET) (int, int *, ADLDisplayInfo **, int);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_TEMPERATURE_GET) (int, int, ADLTemperature *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TEMPERATURE_GET) (int, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_CURRENTACTIVITY_GET) (int, ADLPMActivity *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_THERMALDEVICES_ENUM) (int, int, ADLThermalControllerInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ID_GET) (int, int *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_VIDEOBIOSINFO_GET) (int, ADLBiosInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEEDINFO_GET) (int, int, ADLFanSpeedInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEED_GET) (int, int, ADLFanSpeedValue *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_FANSPEED_GET) (int, ADLOD6FanSpeedInfo *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPARAMETERS_GET) (int, ADLODParameters *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET) (int, int, ADLODPerformanceLevels *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ACTIVE_GET) (int, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE_CAPS) (int, int *, int *, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CURRENTSTATUS_GET) (int, ADLOD6CurrentStatus *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_STATEINFO_GET) (int, int, ADLOD6MemClockState *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CAPABILITIES_GET) (int, ADLOD6Capabilities *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TARGETTEMPERATUREDATA_GET) (int, int *, int *);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TARGETTEMPERATURERANGEINFO_GET) (int, ADLOD6ParameterRange *);
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ACTIVE_GET ) ( int, int* );
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_ADAPTERINFO_GET ) ( LPAdapterInfo, int );
|
||||
typedef int (ADL_API_CALL *ADL_ADAPTER_NUMBEROFADAPTERS_GET ) ( int* );
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_CREATE )(ADL_MAIN_MALLOC_CALLBACK, int );
|
||||
typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_DESTROY )();
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_CURRENTACTIVITY_GET ) (int iAdapterIndex, ADLPMActivity *lpActivity);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEEDINFO_GET ) (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedInfo *lpFanSpeedInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_FANSPEED_GET ) (int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPARAMETERS_GET ) (int iAdapterIndex, ADLODParameters *lpOdParameters);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET ) (int iAdapterIndex, int iDefault, ADLODPerformanceLevels *lpOdPerformanceLevels);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_TEMPERATURE_GET ) (int iAdapterIndex, int iThermalControllerIndex, ADLTemperature *lpTemperature);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE5_THERMALDEVICES_ENUM ) (int iAdapterIndex, int iThermalControllerIndex, ADLThermalControllerInfo *lpThermalControllerInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CAPABILITIES_GET ) (int iAdapterIndex, ADLOD6Capabilities *lpODCapabilities);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_CURRENTSTATUS_GET )(int iAdapterIndex, ADLOD6CurrentStatus *lpCurrentStatus);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_FANSPEED_GET )(int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_STATEINFO_GET )(int iAdapterIndex, int iStateType, ADLOD6StateInfo *lpStateInfo);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE6_TEMPERATURE_GET )(int iAdapterIndex, int *lpTemperature);
|
||||
typedef int (ADL_API_CALL *ADL_OVERDRIVE_CAPS ) (int iAdapterIndex, int *iSupported, int *iEnabled, int *iVersion);
|
||||
typedef int (ADL_API_CALL *ADL2_OVERDRIVE_CAPS) (ADL_CONTEXT_HANDLE context, int iAdapterIndex, int * iSupported, int * iEnabled, int * iVersion);
|
||||
typedef int (ADL_API_CALL *ADL2_NEW_QUERYPMLOGDATA_GET) (ADL_CONTEXT_HANDLE, int, ADLPMLogDataOutput*);
|
||||
|
||||
typedef struct hm_adl_lib
|
||||
{
|
||||
hc_dynlib_t lib;
|
||||
|
||||
ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy;
|
||||
ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create;
|
||||
ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get;
|
||||
ADL_ADAPTER_ACTIVE_GET ADL_Adapter_Active_Get;
|
||||
ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get;
|
||||
ADL_DISPLAY_DISPLAYINFO_GET ADL_Display_DisplayInfo_Get;
|
||||
ADL_ADAPTER_ID_GET ADL_Adapter_ID_Get;
|
||||
ADL_ADAPTER_VIDEOBIOSINFO_GET ADL_Adapter_VideoBiosInfo_Get;
|
||||
ADL_OVERDRIVE5_THERMALDEVICES_ENUM ADL_Overdrive5_ThermalDevices_Enum;
|
||||
ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get;
|
||||
ADL_OVERDRIVE6_TEMPERATURE_GET ADL_Overdrive6_Temperature_Get;
|
||||
ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get;
|
||||
ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create;
|
||||
ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy;
|
||||
ADL_OVERDRIVE5_CURRENTACTIVITY_GET ADL_Overdrive5_CurrentActivity_Get;
|
||||
ADL_OVERDRIVE5_FANSPEEDINFO_GET ADL_Overdrive5_FanSpeedInfo_Get;
|
||||
ADL_OVERDRIVE5_FANSPEED_GET ADL_Overdrive5_FanSpeed_Get;
|
||||
ADL_OVERDRIVE6_FANSPEED_GET ADL_Overdrive6_FanSpeed_Get;
|
||||
ADL_ADAPTER_ACTIVE_GET ADL_Adapter_Active_Get;
|
||||
ADL_OVERDRIVE_CAPS ADL_Overdrive_Caps;
|
||||
ADL_OVERDRIVE5_ODPARAMETERS_GET ADL_Overdrive5_ODParameters_Get;
|
||||
ADL_OVERDRIVE5_ODPERFORMANCELEVELS_GET ADL_Overdrive5_ODPerformanceLevels_Get;
|
||||
ADL_OVERDRIVE5_TEMPERATURE_GET ADL_Overdrive5_Temperature_Get;
|
||||
ADL_OVERDRIVE5_THERMALDEVICES_ENUM ADL_Overdrive5_ThermalDevices_Enum;
|
||||
ADL_OVERDRIVE6_CAPABILITIES_GET ADL_Overdrive6_Capabilities_Get;
|
||||
ADL_OVERDRIVE6_STATEINFO_GET ADL_Overdrive6_StateInfo_Get;
|
||||
ADL_OVERDRIVE6_CURRENTSTATUS_GET ADL_Overdrive6_CurrentStatus_Get;
|
||||
ADL_OVERDRIVE6_TARGETTEMPERATUREDATA_GET ADL_Overdrive6_TargetTemperatureData_Get;
|
||||
ADL_OVERDRIVE6_TARGETTEMPERATURERANGEINFO_GET ADL_Overdrive6_TargetTemperatureRangeInfo_Get;
|
||||
ADL_OVERDRIVE6_FANSPEED_GET ADL_Overdrive6_FanSpeed_Get;
|
||||
ADL_OVERDRIVE6_STATEINFO_GET ADL_Overdrive6_StateInfo_Get;
|
||||
ADL_OVERDRIVE6_TEMPERATURE_GET ADL_Overdrive6_Temperature_Get;
|
||||
ADL_OVERDRIVE_CAPS ADL_Overdrive_Caps;
|
||||
ADL2_OVERDRIVE_CAPS ADL2_Overdrive_Caps;
|
||||
ADL2_NEW_QUERYPMLOGDATA_GET ADL2_New_QueryPMLogData_Get;
|
||||
|
||||
} hm_adl_lib_t;
|
||||
|
||||
@@ -326,6 +656,8 @@ int hm_ADL_Overdrive_CurrentActivity_Get (void *hashcat_ctx, int iAdapterIndex,
|
||||
int hm_ADL_Overdrive5_FanSpeed_Get (void *hashcat_ctx, int iAdapterIndex, int iThermalControllerIndex, ADLFanSpeedValue *lpFanSpeedValue);
|
||||
int hm_ADL_Overdrive6_FanSpeed_Get (void *hashcat_ctx, int iAdapterIndex, ADLOD6FanSpeedInfo *lpFanSpeedInfo);
|
||||
int hm_ADL_Overdrive_Caps (void *hashcat_ctx, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
|
||||
int hm_ADL_Overdrive6_TargetTemperatureData_Get (void *hashcat_ctx, int iAdapterIndex, int *cur_temp, int *default_temp);
|
||||
int hm_ADL2_Overdrive_Caps (void *hashcat_ctx, int iAdapterIndex, int *od_supported, int *od_enabled, int *od_version);
|
||||
int hm_ADL2_New_QueryPMLogData_Get (void *hashcat_ctx, int iAdapterIndex, ADLPMLogDataOutput *lpDataOutput);
|
||||
|
||||
|
||||
#endif // _EXT_ADL_H
|
||||
|
||||
1431
include/ext_hip.h
1431
include/ext_hip.h
File diff suppressed because it is too large
Load Diff
@@ -6,41 +6,26 @@
|
||||
#ifndef _EXT_HIPRTC_H
|
||||
#define _EXT_HIPRTC_H
|
||||
|
||||
/**
|
||||
* from hip_runtime.h (/opt/rocm/hip/include/hip/amd_detail/hiprtc.h)
|
||||
*/
|
||||
// start: amd_detail/hiprtc.h
|
||||
|
||||
/**
|
||||
* \ingroup error
|
||||
* \brief The enumerated type hiprtcResult defines API call result codes.
|
||||
* HIPRTC API functions return hiprtcResult to indicate the call
|
||||
* result.
|
||||
*/
|
||||
typedef enum {
|
||||
HIPRTC_SUCCESS = 0,
|
||||
HIPRTC_ERROR_OUT_OF_MEMORY = 1,
|
||||
HIPRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
|
||||
HIPRTC_ERROR_INVALID_INPUT = 3,
|
||||
HIPRTC_ERROR_INVALID_PROGRAM = 4,
|
||||
HIPRTC_ERROR_INVALID_OPTION = 5,
|
||||
HIPRTC_ERROR_COMPILATION = 6,
|
||||
HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
|
||||
HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
|
||||
HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
|
||||
HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
|
||||
HIPRTC_ERROR_INTERNAL_ERROR = 11
|
||||
typedef enum hiprtcResult {
|
||||
HIPRTC_SUCCESS = 0,
|
||||
HIPRTC_ERROR_OUT_OF_MEMORY = 1,
|
||||
HIPRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
|
||||
HIPRTC_ERROR_INVALID_INPUT = 3,
|
||||
HIPRTC_ERROR_INVALID_PROGRAM = 4,
|
||||
HIPRTC_ERROR_INVALID_OPTION = 5,
|
||||
HIPRTC_ERROR_COMPILATION = 6,
|
||||
HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
|
||||
HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
|
||||
HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
|
||||
HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
|
||||
HIPRTC_ERROR_INTERNAL_ERROR = 11
|
||||
} hiprtcResult;
|
||||
|
||||
/**
|
||||
* \ingroup compilation
|
||||
* \brief hiprtcProgram is the unit of compilation, and an opaque handle for
|
||||
* a program.
|
||||
*
|
||||
* To compile a CUDA program string, an instance of hiprtcProgram must be
|
||||
* created first with ::hiprtcCreateProgram, then compiled with
|
||||
* ::hiprtcCompileProgram.
|
||||
*/
|
||||
typedef struct _hiprtcProgram *hiprtcProgram;
|
||||
typedef struct _hiprtcProgram* hiprtcProgram;
|
||||
|
||||
// stop: amd_detail/hiprtc.h
|
||||
|
||||
#ifdef _WIN32
|
||||
#define HIPRTCAPI __stdcall
|
||||
@@ -54,13 +39,12 @@ typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCADDNAMEEXPRESSION) (hiprtc
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCCOMPILEPROGRAM) (hiprtcProgram, int, const char * const *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCCREATEPROGRAM) (hiprtcProgram *, const char *, const char *, int, const char * const *, const char * const *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCDESTROYPROGRAM) (hiprtcProgram *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETCODE) (hiprtcProgram, char *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETCODESIZE) (hiprtcProgram, size_t *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETLOWEREDNAME) (hiprtcProgram, const char * const, const char **);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETPTX) (hiprtcProgram, char *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETPTXSIZE) (hiprtcProgram, size_t *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETPROGRAMLOG) (hiprtcProgram, char *);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCGETPROGRAMLOGSIZE) (hiprtcProgram, size_t *);
|
||||
typedef const char * (HIPRTC_API_CALL *HIPRTC_HIPRTCGETERRORSTRING) (hiprtcResult);
|
||||
typedef hiprtcResult (HIPRTC_API_CALL *HIPRTC_HIPRTCVERSION) (int *, int *);
|
||||
typedef const char * (HIPRTC_API_CALL *HIPRTC_HIPRTCGETERRORSTRING) (hiprtcResult);
|
||||
|
||||
typedef struct hc_hiprtc_lib
|
||||
{
|
||||
@@ -70,13 +54,12 @@ typedef struct hc_hiprtc_lib
|
||||
HIPRTC_HIPRTCCOMPILEPROGRAM hiprtcCompileProgram;
|
||||
HIPRTC_HIPRTCCREATEPROGRAM hiprtcCreateProgram;
|
||||
HIPRTC_HIPRTCDESTROYPROGRAM hiprtcDestroyProgram;
|
||||
HIPRTC_HIPRTCGETCODE hiprtcGetCode;
|
||||
HIPRTC_HIPRTCGETCODESIZE hiprtcGetCodeSize;
|
||||
HIPRTC_HIPRTCGETLOWEREDNAME hiprtcGetLoweredName;
|
||||
HIPRTC_HIPRTCGETPTX hiprtcGetCode;
|
||||
HIPRTC_HIPRTCGETPTXSIZE hiprtcGetCodeSize;
|
||||
HIPRTC_HIPRTCGETPROGRAMLOG hiprtcGetProgramLog;
|
||||
HIPRTC_HIPRTCGETPROGRAMLOGSIZE hiprtcGetProgramLogSize;
|
||||
HIPRTC_HIPRTCGETERRORSTRING hiprtcGetErrorString;
|
||||
HIPRTC_HIPRTCVERSION hiprtcVersion;
|
||||
|
||||
} hc_hiprtc_lib_t;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
int _wopen (const char *path, int oflag, ...);
|
||||
#endif
|
||||
|
||||
bool hc_fopen (HCFILE *fp, const char *path, char *mode);
|
||||
bool hc_fopen_raw (HCFILE *fp, const char *path, char *mode);
|
||||
bool hc_fopen (HCFILE *fp, const char *path, const char *mode);
|
||||
bool hc_fopen_raw (HCFILE *fp, const char *path, const char *mode);
|
||||
int hc_fscanf (HCFILE *fp, const char *format, void *ptr);
|
||||
int hc_fprintf (HCFILE *fp, const char *format, ...);
|
||||
int hc_vfprintf (HCFILE *fp, const char *format, va_list ap);
|
||||
|
||||
155
include/types.h
155
include/types.h
@@ -671,7 +671,6 @@ typedef enum user_options_defaults
|
||||
SCRYPT_TMTO = 0,
|
||||
SEGMENT_SIZE = 33554432,
|
||||
SELF_TEST_DISABLE = false,
|
||||
SEPARATOR = ':',
|
||||
SHOW = false,
|
||||
SKIP = 0,
|
||||
SLOW_CANDIDATES = false,
|
||||
@@ -1075,7 +1074,7 @@ typedef struct hc_fp
|
||||
bool is_zip;
|
||||
int bom_size;
|
||||
|
||||
char *mode;
|
||||
const char *mode;
|
||||
const char *path;
|
||||
|
||||
} HCFILE;
|
||||
@@ -1503,81 +1502,81 @@ typedef struct hc_device_param
|
||||
|
||||
int hip_warp_size;
|
||||
|
||||
HIPdevice hip_device;
|
||||
HIPcontext hip_context;
|
||||
HIPstream hip_stream;
|
||||
hipDevice_t hip_device;
|
||||
hipCtx_t hip_context;
|
||||
hipStream_t hip_stream;
|
||||
|
||||
HIPevent hip_event1;
|
||||
HIPevent hip_event2;
|
||||
HIPevent hip_event3;
|
||||
hipEvent_t hip_event1;
|
||||
hipEvent_t hip_event2;
|
||||
hipEvent_t hip_event3;
|
||||
|
||||
HIPmodule hip_module;
|
||||
HIPmodule hip_module_shared;
|
||||
HIPmodule hip_module_mp;
|
||||
HIPmodule hip_module_amp;
|
||||
hipModule_t hip_module;
|
||||
hipModule_t hip_module_shared;
|
||||
hipModule_t hip_module_mp;
|
||||
hipModule_t hip_module_amp;
|
||||
|
||||
HIPfunction hip_function1;
|
||||
HIPfunction hip_function12;
|
||||
HIPfunction hip_function2p;
|
||||
HIPfunction hip_function2;
|
||||
HIPfunction hip_function2e;
|
||||
HIPfunction hip_function23;
|
||||
HIPfunction hip_function3;
|
||||
HIPfunction hip_function4;
|
||||
HIPfunction hip_function_init2;
|
||||
HIPfunction hip_function_loop2p;
|
||||
HIPfunction hip_function_loop2;
|
||||
HIPfunction hip_function_mp;
|
||||
HIPfunction hip_function_mp_l;
|
||||
HIPfunction hip_function_mp_r;
|
||||
HIPfunction hip_function_amp;
|
||||
HIPfunction hip_function_tm;
|
||||
HIPfunction hip_function_memset;
|
||||
HIPfunction hip_function_bzero;
|
||||
HIPfunction hip_function_atinit;
|
||||
HIPfunction hip_function_utf8toutf16le;
|
||||
HIPfunction hip_function_decompress;
|
||||
HIPfunction hip_function_aux1;
|
||||
HIPfunction hip_function_aux2;
|
||||
HIPfunction hip_function_aux3;
|
||||
HIPfunction hip_function_aux4;
|
||||
hipFunction_t hip_function1;
|
||||
hipFunction_t hip_function12;
|
||||
hipFunction_t hip_function2p;
|
||||
hipFunction_t hip_function2;
|
||||
hipFunction_t hip_function2e;
|
||||
hipFunction_t hip_function23;
|
||||
hipFunction_t hip_function3;
|
||||
hipFunction_t hip_function4;
|
||||
hipFunction_t hip_function_init2;
|
||||
hipFunction_t hip_function_loop2p;
|
||||
hipFunction_t hip_function_loop2;
|
||||
hipFunction_t hip_function_mp;
|
||||
hipFunction_t hip_function_mp_l;
|
||||
hipFunction_t hip_function_mp_r;
|
||||
hipFunction_t hip_function_amp;
|
||||
hipFunction_t hip_function_tm;
|
||||
hipFunction_t hip_function_memset;
|
||||
hipFunction_t hip_function_bzero;
|
||||
hipFunction_t hip_function_atinit;
|
||||
hipFunction_t hip_function_utf8toutf16le;
|
||||
hipFunction_t hip_function_decompress;
|
||||
hipFunction_t hip_function_aux1;
|
||||
hipFunction_t hip_function_aux2;
|
||||
hipFunction_t hip_function_aux3;
|
||||
hipFunction_t hip_function_aux4;
|
||||
|
||||
HIPdeviceptr hip_d_pws_buf;
|
||||
HIPdeviceptr hip_d_pws_amp_buf;
|
||||
HIPdeviceptr hip_d_pws_comp_buf;
|
||||
HIPdeviceptr hip_d_pws_idx;
|
||||
HIPdeviceptr hip_d_rules;
|
||||
HIPdeviceptr hip_d_rules_c;
|
||||
HIPdeviceptr hip_d_combs;
|
||||
HIPdeviceptr hip_d_combs_c;
|
||||
HIPdeviceptr hip_d_bfs;
|
||||
HIPdeviceptr hip_d_bfs_c;
|
||||
HIPdeviceptr hip_d_tm_c;
|
||||
HIPdeviceptr hip_d_bitmap_s1_a;
|
||||
HIPdeviceptr hip_d_bitmap_s1_b;
|
||||
HIPdeviceptr hip_d_bitmap_s1_c;
|
||||
HIPdeviceptr hip_d_bitmap_s1_d;
|
||||
HIPdeviceptr hip_d_bitmap_s2_a;
|
||||
HIPdeviceptr hip_d_bitmap_s2_b;
|
||||
HIPdeviceptr hip_d_bitmap_s2_c;
|
||||
HIPdeviceptr hip_d_bitmap_s2_d;
|
||||
HIPdeviceptr hip_d_plain_bufs;
|
||||
HIPdeviceptr hip_d_digests_buf;
|
||||
HIPdeviceptr hip_d_digests_shown;
|
||||
HIPdeviceptr hip_d_salt_bufs;
|
||||
HIPdeviceptr hip_d_esalt_bufs;
|
||||
HIPdeviceptr hip_d_tmps;
|
||||
HIPdeviceptr hip_d_hooks;
|
||||
HIPdeviceptr hip_d_result;
|
||||
HIPdeviceptr hip_d_extra0_buf;
|
||||
HIPdeviceptr hip_d_extra1_buf;
|
||||
HIPdeviceptr hip_d_extra2_buf;
|
||||
HIPdeviceptr hip_d_extra3_buf;
|
||||
HIPdeviceptr hip_d_root_css_buf;
|
||||
HIPdeviceptr hip_d_markov_css_buf;
|
||||
HIPdeviceptr hip_d_st_digests_buf;
|
||||
HIPdeviceptr hip_d_st_salts_buf;
|
||||
HIPdeviceptr hip_d_st_esalts_buf;
|
||||
hipDeviceptr_t hip_d_pws_buf;
|
||||
hipDeviceptr_t hip_d_pws_amp_buf;
|
||||
hipDeviceptr_t hip_d_pws_comp_buf;
|
||||
hipDeviceptr_t hip_d_pws_idx;
|
||||
hipDeviceptr_t hip_d_rules;
|
||||
hipDeviceptr_t hip_d_rules_c;
|
||||
hipDeviceptr_t hip_d_combs;
|
||||
hipDeviceptr_t hip_d_combs_c;
|
||||
hipDeviceptr_t hip_d_bfs;
|
||||
hipDeviceptr_t hip_d_bfs_c;
|
||||
hipDeviceptr_t hip_d_tm_c;
|
||||
hipDeviceptr_t hip_d_bitmap_s1_a;
|
||||
hipDeviceptr_t hip_d_bitmap_s1_b;
|
||||
hipDeviceptr_t hip_d_bitmap_s1_c;
|
||||
hipDeviceptr_t hip_d_bitmap_s1_d;
|
||||
hipDeviceptr_t hip_d_bitmap_s2_a;
|
||||
hipDeviceptr_t hip_d_bitmap_s2_b;
|
||||
hipDeviceptr_t hip_d_bitmap_s2_c;
|
||||
hipDeviceptr_t hip_d_bitmap_s2_d;
|
||||
hipDeviceptr_t hip_d_plain_bufs;
|
||||
hipDeviceptr_t hip_d_digests_buf;
|
||||
hipDeviceptr_t hip_d_digests_shown;
|
||||
hipDeviceptr_t hip_d_salt_bufs;
|
||||
hipDeviceptr_t hip_d_esalt_bufs;
|
||||
hipDeviceptr_t hip_d_tmps;
|
||||
hipDeviceptr_t hip_d_hooks;
|
||||
hipDeviceptr_t hip_d_result;
|
||||
hipDeviceptr_t hip_d_extra0_buf;
|
||||
hipDeviceptr_t hip_d_extra1_buf;
|
||||
hipDeviceptr_t hip_d_extra2_buf;
|
||||
hipDeviceptr_t hip_d_extra3_buf;
|
||||
hipDeviceptr_t hip_d_root_css_buf;
|
||||
hipDeviceptr_t hip_d_markov_css_buf;
|
||||
hipDeviceptr_t hip_d_st_digests_buf;
|
||||
hipDeviceptr_t hip_d_st_salts_buf;
|
||||
hipDeviceptr_t hip_d_st_esalts_buf;
|
||||
|
||||
// API: opencl
|
||||
|
||||
@@ -1728,8 +1727,7 @@ typedef struct backend_ctx
|
||||
int rc_hip_init;
|
||||
int rc_hiprtc_init;
|
||||
|
||||
int hiprtc_driver_version;
|
||||
int hip_driver_version;
|
||||
int hip_driverVersion;
|
||||
|
||||
// opencl
|
||||
|
||||
@@ -1801,8 +1799,6 @@ typedef struct hwmon_ctx
|
||||
|
||||
hm_attrs_t *hm_device;
|
||||
|
||||
ADLOD6MemClockState *od_clock_mem_status;
|
||||
|
||||
} hwmon_ctx_t;
|
||||
|
||||
#if defined (__APPLE__)
|
||||
@@ -2106,6 +2102,7 @@ typedef struct user_options
|
||||
bool skip_chgd;
|
||||
bool limit_chgd;
|
||||
bool scrypt_tmto_chgd;
|
||||
bool separator_chgd;
|
||||
|
||||
bool advice_disable;
|
||||
bool benchmark;
|
||||
@@ -2175,7 +2172,7 @@ typedef struct user_options
|
||||
char *potfile_path;
|
||||
char *restore_file_path;
|
||||
char **rp_files;
|
||||
char separator;
|
||||
char *separator;
|
||||
char *truecrypt_keyfiles;
|
||||
char *veracrypt_keyfiles;
|
||||
const char *custom_charset_1;
|
||||
@@ -2241,6 +2238,8 @@ typedef struct user_options_extra
|
||||
|
||||
u32 wordlist_mode;
|
||||
|
||||
char separator;
|
||||
|
||||
char *hc_hash; // can be filename or string
|
||||
|
||||
int hc_workc; // can be 0 in bf-mode = default mask
|
||||
|
||||
Reference in New Issue
Block a user