nir: Move compute system value lowering to a separate pass
[mesa.git] / src / intel / compiler / brw_eu_validate.c
index e2bb552c720d3a0ab2f8278894addd1e75ba9cff..d87c550a190e182d6e8a7f12d9d1a8afe277403c 100644 (file)
@@ -38,6 +38,7 @@
  * test_eu_validate.cpp) will be rejected.
  */
 
+#include <stdlib.h>
 #include "brw_eu.h"
 
 /* We're going to do lots of string concatenation, so this should help. */
@@ -695,6 +696,9 @@ general_restrictions_based_on_operand_types(const struct gen_device_info *devinf
    unsigned exec_size = 1 << brw_inst_exec_size(devinfo, inst);
    struct string error_msg = { .str = NULL, .len = 0 };
 
+   if (inst_is_send(devinfo, inst))
+      return error_msg;
+
    if (devinfo->gen >= 11) {
       if (num_sources == 3) {
          ERROR_IF(brw_reg_type_to_size(brw_inst_3src_a1_src1_type(devinfo, inst)) == 1 ||
@@ -712,9 +716,6 @@ general_restrictions_based_on_operand_types(const struct gen_device_info *devinf
    if (num_sources == 3)
       return error_msg;
 
-   if (inst_is_send(devinfo, inst))
-      return error_msg;
-
    if (exec_size == 1)
       return error_msg;
 
@@ -1937,7 +1938,7 @@ instruction_restrictions(const struct gen_device_info *devinfo,
    return error_msg;
 }
 
-static bool
+bool
 brw_validate_instruction(const struct gen_device_info *devinfo,
                          const brw_inst *inst, int offset,
                          struct disasm_info *disasm)