[Mesa-dev] [PATCH 12/12] i965/fs: Move struct brw_compile (p) entirely inside fs_generator.

Eric Anholt eric at anholt.net
Mon Nov 26 11:05:17 PST 2012


Kenneth Graunke <kenneth at whitecape.org> writes:

> The brw_compile structure contains the brw_instruction store and the
> brw_eu_emit.c state tracking fields.  These are only useful for the
> final assembly generation pass; the earlier compilation stages doesn't
> need them.
>
> This also means that the code generator for future hardware won't have
> access to the brw_compile structure, which is extremely desirable
> because it prevents accidental generation of Gen4-7 code.

>     mem_ctx = c;
> +
> +   p = &_p;
> +   brw_init_compile(brw, p, mem_ctx);

Any reason not to just ralloc_zero here instead of having a funny static
copy?

Other than that, this looks like a pretty nice split.  Other than the
little comments,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121126/061d095f/attachment.pgp>


More information about the mesa-dev mailing list