A Helper interface to do renderer specific constant folding. More...
#include <mdl_generated_dag.h>
Public Member Functions | |
| virtual bool | is_evaluate_intrinsic_function_enabled (IDefinition::Semantics sema) const =0 |
| Check whether evaluate_intrinsic_function() should be called for an unhandled intrinsic functions with the given semantic. More... | |
| virtual IValue const * | evaluate_intrinsic_function (IValue_factory *value_factory, IDefinition::Semantics sema, IValue const *const arguments[], size_t n_arguments) const =0 |
| Evaluate an intrinsic function. More... | |
A Helper interface to do renderer specific constant folding.
This interface is called by the DAG IR optimizer on functions that have a known semantics but cannot be folded in general. A renderer might have additional knowledge that allows folding.
One example is tex::width(). A renderer might already know the width of a texture, so it could replace the runtime call by a constant.
|
pure virtual |
Evaluate an intrinsic function.
| value_factory | The value factory to create values. |
| sema | The semantic of the intrinsic function to evaluate. |
| arguments | The arguments of the function. |
| n_arguments | The number of arguments. |
|
pure virtual |
Check whether evaluate_intrinsic_function() should be called for an unhandled intrinsic functions with the given semantic.
| sema | the semantic to check for |