On 12/22/2016 05:07 PM, Nicolai Hähnle wrote:
> On 19.12.2016 23:26, Christian Inci wrote:
>> Hashcat needs MAX_GLOBAL_BUFFERS to be 21 or even 22 for some modes. It'll
>> crash otherwise.
>> I'm adding an assert to see if programs need it to be even higher.
>>
>> Signed-off-by: Christian Inci
>
> I'm not too familiar with OpenCL, but shouldn't there be some propagation of
> the number of bindings to the caller and appropriate error handling? Or is
> the number of bindings supposed to be adjusted dynamically based on
> application need?
>
> Either way, this can only serve as a temporary fix. The real bug is still out
> there somewhere else.
I don't have a single clue about OpenCL. I found out that I had to change that
#define after days of debugging. It were right in front of my eyes and I didn't
had a clue.
Despite that OpenCL kernels on Mesa don't like "static" and "inline" (thanks
"sed -i 's/...//g' ..."), hashcat isn't as stable (under Mesa) as I hoped.
>
>
>> ---
>> src/gallium/drivers/radeonsi/si_compute.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/radeonsi/si_compute.c
>> b/src/gallium/drivers/radeonsi/si_compute.c
>> index 9d83cb3a..9bad34ed 100644
>> --- a/src/gallium/drivers/radeonsi/si_compute.c
>> +++ b/src/gallium/drivers/radeonsi/si_compute.c
>> @@ -32,7 +32,7 @@
>> #include "si_pipe.h"
>> #include "sid.h"
>>
>> -#define MAX_GLOBAL_BUFFERS 20
>> +#define MAX_GLOBAL_BUFFERS 22
>>
>> struct si_compute {
>> unsigned ir_type;
>> @@ -195,6 +195,7 @@ static void si_set_global_binding(
>> unsigned i;
>> struct si_context *sctx = (struct si_context*)ctx;
>> struct si_compute *program = sctx->cs_shader_state.program;
>> +assert(n <= MAX_GLOBAL_BUFFERS);
>
> This should check for first + n. I'm going to change this before pushing.
Thanks. My bad.
>
> Nicolai
>
>>
>> if (!resources) {
>> for (i = first; i < first + n; i++) {
>>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev