[Mesa-dev] [PATCH] radeonsi: Bugfix needed for hashcat
Christian Inci
chris.bugsfd at broke-the-inter.net
Mon Dec 19 22:26:35 UTC 2016
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 <chris.bugsfd at broke-the-inter.net>
---
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);
if (!resources) {
for (i = first; i < first + n; i++) {
--
2.11.0
More information about the mesa-dev
mailing list