From f4dbd46b71c602eda88a29ac0795d48ed158730d Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 23 Jan 2021 13:54:46 +0100 Subject: [PATCH] trying skip devices instead of return -1 --- src/backend.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/backend.c b/src/backend.c index 5dfb777b9..86a71d6b1 100644 --- a/src/backend.c +++ b/src/backend.c @@ -6670,7 +6670,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) CL_rc = hc_clCreateContext (hashcat_ctx, properties, 1, &device_param->opencl_device, NULL, NULL, &context); */ - if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &context) == -1) return -1; + if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &context) == -1) + { + device_param->skipped = true; + continue; + } /** * create command-queue @@ -6678,7 +6682,11 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) cl_command_queue command_queue; - if (hc_clCreateCommandQueue (hashcat_ctx, context, device_param->opencl_device, 0, &command_queue) == -1) return -1; + if (hc_clCreateCommandQueue (hashcat_ctx, context, device_param->opencl_device, 0, &command_queue) == -1) + { + device_param->skipped = true; + continue; + } // instruction set @@ -7910,7 +7918,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) CL_rc = hc_clCreateContext (hashcat_ctx, properties, 1, &device_param->opencl_device, NULL, NULL, &device_param->opencl_context); */ - if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &device_param->opencl_context) == -1) return -1; + if (hc_clCreateContext (hashcat_ctx, NULL, 1, &device_param->opencl_device, NULL, NULL, &device_param->opencl_context) == -1) + { + device_param->skipped = true; + continue; + } /** * create command-queue @@ -7919,7 +7931,11 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // not supported with NV // device_param->opencl_command_queue = hc_clCreateCommandQueueWithProperties (hashcat_ctx, device_param->opencl_device, NULL); - if (hc_clCreateCommandQueue (hashcat_ctx, device_param->opencl_context, device_param->opencl_device, CL_QUEUE_PROFILING_ENABLE, &device_param->opencl_command_queue) == -1) return -1; + if (hc_clCreateCommandQueue (hashcat_ctx, device_param->opencl_context, device_param->opencl_device, CL_QUEUE_PROFILING_ENABLE, &device_param->opencl_command_queue) == -1) + { + device_param->skipped = true; + continue; + } } /**