On Tue, May 2, 2017 at 5:30 AM, Iago Toral <ito...@igalia.com> wrote: > On Mon, 2017-05-01 at 13:54 -0700, Matt Turner wrote: >> This will allow us to more easily run brw_validate_instructions() on >> shader programs we find in GPU hang error states. >> --- >> src/intel/compiler/brw_eu.h | 3 ++- >> src/intel/compiler/brw_eu_validate.c | 10 ++++------ >> src/intel/compiler/brw_fs_generator.cpp | 10 ++++++++-- >> src/intel/compiler/brw_vec4_generator.cpp | 8 ++++++-- >> src/intel/compiler/test_eu_validate.cpp | 3 ++- >> 5 files changed, 22 insertions(+), 12 deletions(-) >> >> diff --git a/src/intel/compiler/brw_eu.h >> b/src/intel/compiler/brw_eu.h >> index f422595..87c69a4 100644 >> --- a/src/intel/compiler/brw_eu.h >> +++ b/src/intel/compiler/brw_eu.h >> @@ -548,7 +548,8 @@ void brw_debug_compact_uncompact(const struct >> gen_device_info *devinfo, >> brw_inst *orig, brw_inst >> *uncompacted); >> >> /* brw_eu_validate.c */ >> -bool brw_validate_instructions(const struct brw_codegen *p, int >> start_offset, >> +bool brw_validate_instructions(const struct gen_device_info >> *devinfo, >> + void *assembly, int start_offset, int >> end_offset, >> struct annotation_info *annotation); >> >> static inline int >> diff --git a/src/intel/compiler/brw_eu_validate.c >> b/src/intel/compiler/brw_eu_validate.c >> index f231ea0..39363e4 100644 >> --- a/src/intel/compiler/brw_eu_validate.c >> +++ b/src/intel/compiler/brw_eu_validate.c >> @@ -1042,17 +1042,15 @@ 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; >> - src_offset += sizeof(brw_inst)) { >> + for (int src_offset = start_offset; src_offset < end_offset;) { > > I think in this patch you still need to do 'src_offset += > sizeof(brw_inst)' in each iteration. Removing it should wait until your > next patch in this series.
Thank you. Nice catch. Fixed locally. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev