diff options
author | Matt Turner <[email protected]> | 2017-04-28 17:05:44 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-05-15 11:42:47 -0700 |
commit | a7217e909ce6e7d17eea8fd65191bb87deb3b496 (patch) | |
tree | 03645a2632c215dd70c1204fe3b88b344e66923c /src/intel/compiler/brw_eu_validate.c | |
parent | 8ca8ebbf78d6e5eacbd42dc245f503e0c9787268 (diff) |
i965: Pass pointer and end of assembly to brw_validate_instructions
This will allow us to more easily run brw_validate_instructions() on
shader programs we find in GPU hang error states.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_eu_validate.c')
-rw-r--r-- | src/intel/compiler/brw_eu_validate.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index a632242e0f8..ba3fe0d85df 100644 --- a/src/intel/compiler/brw_eu_validate.c +++ b/src/intel/compiler/brw_eu_validate.c @@ -1030,17 +1030,16 @@ region_alignment_rules(const struct gen_device_info *devinfo, } bool -brw_validate_instructions(const struct brw_codegen *p, int start_offset, +brw_validate_instructions(const struct gen_device_info *devinfo, + void *assembly, int start_offset, int end_offset, struct annotation_info *annotation) { - const struct gen_device_info *devinfo = p->devinfo; - const void *store = p->store; bool valid = true; - for (int src_offset = start_offset; src_offset < p->next_insn_offset; + for (int src_offset = start_offset; src_offset < end_offset; src_offset += sizeof(brw_inst)) { struct string error_msg = { .str = NULL, .len = 0 }; - const brw_inst *inst = store + src_offset; + const brw_inst *inst = assembly + src_offset; if (is_unsupported_inst(devinfo, inst)) { ERROR("Instruction not supported on this Gen"); |