glsl: Add optional parameters to the ir_factory constructor.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 4 Sep 2013 00:07:18 +0000 (17:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Sep 2013 18:52:22 +0000 (11:52 -0700)
commit8d90328eb3a934e07a9fa54b829e768750ab6d8b
tree45ed854e98c73bf7c82d5ee3f840c595aea66eda
parent666df565519357833aabb265e42d1ed981bf2a4a
glsl: Add optional parameters to the ir_factory constructor.

Each ir_factory needs an instruction list and memory context in order to
be useful.  Rather than creating an object and manually assigning these,
we can just use optional parameters in the constructor.

This makes it possible to create a ready-to-use factory in one line:

   ir_factory body(&sig->body, mem_ctx);

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ir_builder.h