diff options
author | Eric Anholt <eric@anholt.net> | 2010-08-27 12:53:48 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-27 13:14:52 -0700 |
commit | a0ffee2cd79deb5a437784e25de6512d7f8e6bb8 (patch) | |
tree | 0fa802375757633cdee699c60694533b151bd4a7 /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 40932c1752b0fa918d764e3367f5ab450033304a (diff) |
i965: When encountering an unknown opcode in new FS backend, print its name.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 673a31c1dd..41b8ecd681 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -369,6 +369,7 @@ public: this->p = &c->func; this->brw = p->brw; this->intel = &brw->intel; + this->ctx = &intel->ctx; this->mem_ctx = talloc_new(NULL); this->shader = shader; this->fail = false; @@ -431,6 +432,7 @@ public: struct brw_context *brw; struct intel_context *intel; + GLcontext *ctx; struct brw_wm_compile *c; struct brw_compile *p; struct brw_shader *shader; @@ -1453,7 +1455,13 @@ fs_visitor::generate_code() generate_fb_write(inst); break; default: - assert(!"not reached"); + if (inst->opcode < (int)ARRAY_SIZE(brw_opcodes)) { + _mesa_problem(ctx, "Unsupported opcode `%s' in FS", + brw_opcodes[inst->opcode].name); + } else { + _mesa_problem(ctx, "Unsupported opcode %d in FS", inst->opcode); + } + this->fail = true; } if (annotation_len < p->nr_insn) { |