From 2e85972ec55191d9050988571d3de29b8653e456 Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 20 Oct 2017 08:39:23 +0200 Subject: [PATCH] Add special detection for NVIDIA OpenCL devices on OSX --- include/opencl.h | 1 + src/opencl.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/opencl.h b/include/opencl.h index c2ec2f4ca..917da3953 100644 --- a/include/opencl.h +++ b/include/opencl.h @@ -13,6 +13,7 @@ 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_NV[] = "NVIDIA"; 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"; diff --git a/src/opencl.c b/src/opencl.c index 21552090b..630480501 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -2842,6 +2842,10 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) { device_vendor_id = VENDOR_ID_APPLE; } + else if (strcmp (device_vendor, CL_VENDOR_APPLE_USE_NV) == 0) + { + device_vendor_id = VENDOR_ID_NV; + } else if (strcmp (device_vendor, CL_VENDOR_INTEL_BEIGNET) == 0) { device_vendor_id = VENDOR_ID_INTEL_BEIGNET;