mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
Allow using Metal < 300 with --force
This commit is contained in:
parent
8a81f6143a
commit
0f63294b8a
@ -12,7 +12,7 @@
|
||||
#define IS_CUDA
|
||||
#elif defined __HIPCC__
|
||||
#define IS_HIP
|
||||
#elif defined __METAL__
|
||||
#elif defined __METAL__ || defined __METAL_MACOS__
|
||||
#define IS_METAL
|
||||
#else
|
||||
#define IS_OPENCL
|
||||
|
@ -4505,7 +4505,11 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (hc_mtlRuntimeGetVersionString (hashcat_ctx, backend_ctx->metal_runtimeVersionStr, &version_len) == -1) return -1;
|
||||
|
||||
if (atoi (backend_ctx->metal_runtimeVersionStr) < 300)
|
||||
backend_ctx->metal_runtimeVersion = atoi (backend_ctx->metal_runtimeVersionStr);
|
||||
|
||||
if (user_options->force == false)
|
||||
{
|
||||
if (backend_ctx->metal_runtimeVersion < 300)
|
||||
{
|
||||
event_log_warning (hashcat_ctx, "Unsupported Apple Metal runtime version '%s' detected! Falling back to OpenCL...", backend_ctx->metal_runtimeVersionStr);
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
@ -4519,6 +4523,7 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
mtl_close (hashcat_ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rc_metal_init = -1;
|
||||
|
@ -1221,18 +1221,10 @@ void backend_info (hashcat_ctx_t *hashcat_ctx)
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
|
||||
int metal_devices_cnt = backend_ctx->metal_devices_cnt;
|
||||
int metal_runtimeVersion = backend_ctx->metal_runtimeVersion;
|
||||
|
||||
char *metal_runtimeVersionStr = backend_ctx->metal_runtimeVersionStr;
|
||||
|
||||
if (metal_runtimeVersionStr != NULL)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Metal.Version.: %s", metal_runtimeVersionStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Metal.Version.: %u", metal_runtimeVersion);
|
||||
}
|
||||
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
|
||||
for (int metal_devices_idx = 0; metal_devices_idx < metal_devices_cnt; metal_devices_idx++)
|
||||
@ -1542,6 +1534,7 @@ void backend_info_compact (hashcat_ctx_t *hashcat_ctx)
|
||||
if (backend_ctx->mtl)
|
||||
{
|
||||
int metal_devices_cnt = backend_ctx->metal_devices_cnt;
|
||||
|
||||
char *metal_runtimeVersionStr = backend_ctx->metal_runtimeVersionStr;
|
||||
|
||||
size_t len = event_log_info (hashcat_ctx, "METAL API (Metal %s)", metal_runtimeVersionStr);
|
||||
|
Loading…
Reference in New Issue
Block a user