i965/fs: Remove the GL context from the generator
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 15 Apr 2015 21:51:18 +0000 (14:51 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 22 Apr 2015 23:00:33 +0000 (16:00 -0700)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 24ca43ccdbee6fe97addca29a2acbcc82d0636f3..c42907050d0d2b9d4a4c086fa00c02bab6b0749c 100644 (file)
@@ -639,7 +639,6 @@ private:
    bool patch_discard_jumps_to_fb_writes();
 
    struct brw_context *brw;
-   struct gl_context *ctx;
 
    struct brw_compile *p;
    const void * const key;
index 3e103b21f4538dc36b378be39daff3fabbdbc569..539619a68b8bca35de9832d1576f3404abc9ad2e 100644 (file)
@@ -136,8 +136,6 @@ fs_generator::fs_generator(struct brw_context *brw,
      runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(false),
      stage_abbrev(stage_abbrev), mem_ctx(mem_ctx)
 {
-   ctx = &brw->ctx;
-
    p = rzalloc(mem_ctx, struct brw_compile);
    brw_init_compile(brw->intelScreen->devinfo, p, mem_ctx);
 }
@@ -2091,14 +2089,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
          break;
 
       default:
-        if (inst->opcode < (int) ARRAY_SIZE(opcode_descs)) {
-           _mesa_problem(ctx, "Unsupported opcode `%s' in %s",
-                         opcode_descs[inst->opcode].name, stage_abbrev);
-        } else {
-           _mesa_problem(ctx, "Unsupported opcode %d in %s", inst->opcode,
-                          stage_abbrev);
-        }
-        abort();
+         unreachable("Unsupported opcode");
 
       case SHADER_OPCODE_LOAD_PAYLOAD:
          unreachable("Should be lowered by lower_load_payload()");