mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
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>
This commit is contained in:
parent
666df56551
commit
8d90328eb3
1 changed files with 3 additions and 3 deletions
|
|
@ -82,9 +82,9 @@ public:
|
|||
|
||||
class ir_factory {
|
||||
public:
|
||||
ir_factory()
|
||||
: instructions(NULL),
|
||||
mem_ctx(NULL)
|
||||
ir_factory(exec_list *instructions = NULL, void *mem_ctx = NULL)
|
||||
: instructions(instructions),
|
||||
mem_ctx(mem_ctx)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue