Move macros DGST_R0 - DGST_R3 to host, define dgst_size for opencl kernel from host...
[hashcat.git] / OpenCL / m08900.cl
index 59e5bd8..6b50d19 100644 (file)
@@ -5,14 +5,8 @@
 
 #define _SCRYPT_
 
-#include "inc_hash_constants.h"
 #include "inc_vendor.cl"
-
-#define DGST_R0 0
-#define DGST_R1 1
-#define DGST_R2 2
-#define DGST_R3 3
-
+#include "inc_hash_constants.h"
 #include "inc_hash_functions.cl"
 #include "inc_types.cl"
 #include "inc_common.cl"
@@ -683,9 +677,11 @@ void scrypt_smix (uint4 *X, uint4 *T, const u32 phy, __global uint4 *V)
   const u32 ySIZE = SCRYPT_N / SCRYPT_TMTO;
   const u32 zSIZE = STATE_CNT4;
 
-  const u32 gid = get_global_id (0);
+  const u32 lid = get_local_id (0);
+  const u32 lsz = get_local_size (0);
+  const u32 rid = get_group_id (0);
 
-  const u32 x = gid % xSIZE;
+  const u32 x = (rid * lsz) + lid;
 
   #ifdef _unroll
   #pragma unroll