r600g: Fix out of bounds access
[mesa.git] / src / gallium / drivers / r600 / r600_asm.h
index 1629399d8fece398f07a4732824828d9ce3f371a..b12913d4374cb04ba08b52696c4a0186680b3470 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "r600_pipe.h"
 #include "r600_isa.h"
+#include "tgsi/tgsi_exec.h"
 
 struct r600_bytecode_alu_src {
        unsigned                        sel;
@@ -238,7 +239,7 @@ struct r600_bytecode {
        unsigned                        force_add_cf;
        uint32_t                        *bytecode;
        uint32_t                        fc_sp;
-       struct r600_cf_stack_entry      fc_stack[32];
+       struct r600_cf_stack_entry      fc_stack[TGSI_EXEC_MAX_NESTING];
        struct r600_stack_info          stack;
        unsigned        ar_loaded;
        unsigned        ar_reg;