summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intel/compiler/brw_eu.h3
-rw-r--r--src/intel/compiler/brw_eu_validate.c2
-rw-r--r--src/intel/compiler/test_eu_compact.cpp3
3 files changed, 7 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h
index ce1368a7fd3..ea4ee7748f6 100644
--- a/src/intel/compiler/brw_eu.h
+++ b/src/intel/compiler/brw_eu.h
@@ -1243,6 +1243,9 @@ void brw_debug_compact_uncompact(const struct gen_device_info *devinfo,
brw_inst *orig, brw_inst *uncompacted);
/* brw_eu_validate.c */
+bool brw_validate_instruction(const struct gen_device_info *devinfo,
+ const brw_inst *inst, int offset,
+ struct disasm_info *disasm);
bool brw_validate_instructions(const struct gen_device_info *devinfo,
const void *assembly, int start_offset, int end_offset,
struct disasm_info *disasm);
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c
index e2bb552c720..3b802d3b355 100644
--- a/src/intel/compiler/brw_eu_validate.c
+++ b/src/intel/compiler/brw_eu_validate.c
@@ -1937,7 +1937,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)
diff --git a/src/intel/compiler/test_eu_compact.cpp b/src/intel/compiler/test_eu_compact.cpp
index ec93d2bd142..4cb33aefba2 100644
--- a/src/intel/compiler/test_eu_compact.cpp
+++ b/src/intel/compiler/test_eu_compact.cpp
@@ -160,6 +160,9 @@ test_fuzz_compact_instruction(struct brw_codegen *p, brw_inst src)
clear_pad_bits(p->devinfo, &instr);
+ if (!brw_validate_instruction(p->devinfo, &instr, 0, NULL))
+ continue;
+
if (!test_compact_instruction(p, instr)) {
printf(" twiddled bits for fuzzing %d, %d\n", bit0, bit1);
return false;