mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 02:30:18 +01:00
Add builtin pow() function.
This commit is contained in:
parent
0f09aea3bf
commit
ddd2e83db2
2 changed files with 11 additions and 1 deletions
|
|
@ -132,6 +132,15 @@ generate_max(exec_list *instructions,
|
|||
generate_binop(instructions, declarations, type, ir_binop_max);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
generate_pow(exec_list *instructions,
|
||||
ir_variable **declarations,
|
||||
const glsl_type *type)
|
||||
{
|
||||
generate_binop(instructions, declarations, type, ir_binop_pow);
|
||||
}
|
||||
|
||||
void
|
||||
generate_function_instance(ir_function *f,
|
||||
const char *name,
|
||||
|
|
@ -213,7 +222,7 @@ generate_110_functions(glsl_symbol_table *symtab, exec_list *instructions)
|
|||
/* FINISHME: acos() */
|
||||
/* FINISHME: atan(y,x) */
|
||||
/* FINISHME: atan(y/x) */
|
||||
/* FINISHME: pow() */
|
||||
make_gentype_function(symtab, instructions, "pow", 2, generate_pow);
|
||||
make_gentype_function(symtab, instructions, "exp", 1, generate_exp);
|
||||
make_gentype_function(symtab, instructions, "log", 1, generate_log);
|
||||
/* FINISHME: exp2() */
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ void ir_print_visitor::visit(ir_expression *ir)
|
|||
"dot",
|
||||
"min",
|
||||
"max",
|
||||
"pow",
|
||||
};
|
||||
|
||||
printf("(expression ");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue