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 <itoral@igalia.com>
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user