From db91876d23be28f4fd4d17967fe7cb46dfa2ef7b Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Sat, 13 Apr 2019 14:36:49 +0200 Subject: [PATCH] Disable check for device_available_mem on Windows in combination with AMD drivers --- src/opencl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opencl.c b/src/opencl.c index 61967522f..ff6ee8c33 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -4033,7 +4033,11 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) device_param->device_available_mem = device_param->device_global_mem - MAX_ALLOC_CHECKS_SIZE; + #if defined (_WIN) + if ((device_param->device_type & CL_DEVICE_TYPE_GPU) && (device_param->platform_vendor_id == VENDOR_ID_NV)) + #else if ((device_param->device_type & CL_DEVICE_TYPE_GPU) && ((device_param->platform_vendor_id == VENDOR_ID_NV) || (device_param->platform_vendor_id == VENDOR_ID_AMD))) + #endif { // OK, so the problem here is the following: // There's just CL_DEVICE_GLOBAL_MEM_SIZE to ask OpenCL about the total memory on the device,