#define fsv_assert(cond) \
if (!(cond)) { \
- fprintf(stderr, "ASSERT: FS validation failed!\n"); \
+ fprintf(stderr, "ASSERT: Scalar %s validation failed!\n", stage_abbrev); \
dump_instruction(inst, stderr); \
fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, #cond); \
abort(); \
fs_visitor::validate()
{
foreach_block_and_inst (block, fs_inst, inst, cfg) {
- if (inst->dst.file == GRF) {
+ if (inst->dst.file == VGRF) {
fsv_assert(inst->dst.reg_offset + inst->regs_written <=
- alloc.sizes[inst->dst.reg]);
+ alloc.sizes[inst->dst.nr]);
}
for (unsigned i = 0; i < inst->sources; i++) {
- if (inst->src[i].file == GRF) {
+ if (inst->src[i].file == VGRF) {
fsv_assert(inst->src[i].reg_offset + inst->regs_read(i) <=
- (int)alloc.sizes[inst->src[i].reg]);
+ (int)alloc.sizes[inst->src[i].nr]);
}
}
}