1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 18:08:20 +00:00

Migrate unroll handling for -m 14100 from OpenCL/inc_vendor.cl to module_jit_build_options()

This commit is contained in:
jsteube 2019-03-03 11:55:42 +01:00
parent b0a83b28d1
commit 1714382daa
2 changed files with 13 additions and 4 deletions

View File

@ -198,9 +198,6 @@
#ifdef IS_AMD #ifdef IS_AMD
#ifdef IS_GPU #ifdef IS_GPU
#if KERN_TYPE == 14100
#undef _unroll
#endif
#if KERN_TYPE == 15300 #if KERN_TYPE == 15300
#undef _unroll #undef _unroll
#endif #endif

View File

@ -107,6 +107,18 @@ const char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig,
return mask; return mask;
} }
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{
hc_asprintf (&jit_build_options, "-D NO_UNROLL");
}
return jit_build_options;
}
int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len)
{ {
u32 *digest = (u32 *) digest_buf; u32 *digest = (u32 *) digest_buf;
@ -235,7 +247,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT; module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT; module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT; module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = MODULE_DEFAULT; module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT; module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT; module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT; module_ctx->module_kernel_accel_min = MODULE_DEFAULT;