[Mesa-dev] [PATCH 08/23] i965/fs: Remove the GL context from the generator

Matt Turner mattst88 at gmail.com
Tue Apr 21 10:14:16 PDT 2015


On Fri, Apr 17, 2015 at 7:11 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs.h             |  1 -
>  src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 11 +----------
>  2 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
> index 32063f0..fa2a028 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h
> @@ -641,7 +641,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;
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index 58fdc40..b9ec248 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -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);
>  }
> @@ -2084,14 +2082,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();
> +         assert("!Unsupported opcode");

unreachable()


More information about the mesa-dev mailing list