Skip to content

Commit eb7682f

Browse files
committed
gpg-opencl: Bugfix for worksize limit
Bug found after bumping work size during self-test.
1 parent 8682bc3 commit eb7682f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/opencl_gpg_fmt_plug.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ static const char *warn[] = {
121121
/* ------- Helper functions ------- */
122122
static size_t get_task_max_work_group_size()
123123
{
124-
return autotune_get_task_max_work_group_size(FALSE, 0, crypt_kernel);
124+
size_t s;
125+
126+
s = autotune_get_task_max_work_group_size(FALSE, 0, crypt_kernel);
127+
s = MIN(s, autotune_get_task_max_work_group_size(FALSE, 0, crypt_kernel_sha256));
128+
s = MIN(s, autotune_get_task_max_work_group_size(FALSE, 0, crypt_kernel_sha512));
129+
return s;
125130
}
126131

127132
static void release_clobj(void);

0 commit comments

Comments
 (0)