#include <ShVariableNode.hpp>
Inheritance diagram for SH::ShVariableNode:


Public Member Functions | |
| ShVariableNode (ShBindingType kind, int size, ShValueType valueType, ShSemanticType type=SH_ATTRIB) | |
| Constructs a VariableNode that holds a tuple of data of type. | |
| bool | uniform () const |
| Is this a uniform (non-shader specific) variable? | |
| bool | hasValues () const |
| Does this variable have values in the host, e.g. | |
| int | size () const |
| Get the number of elements in this variable. | |
| void | size (int size) |
| void | lock () |
| Do not update bound shaders in subsequent setValue calls. | |
| void | unlock () |
| Update bound shader values, and turn off locking. | |
| ShValueType | valueType () const |
| Returns index of the data type held in this node. | |
| std::string | name () const |
| Get this variable's name. | |
| void | name (const std::string &n) |
| Set this variable's name. | |
| bool | hasRange () |
| Whether this variable has ranges set. | |
| void | rangeVariant (const ShVariant *low, const ShVariant *high) |
| Set a range of possible values for this variable's elements. | |
| void | rangeVariant (const ShVariant *low, const ShVariant *high, bool neg, const ShSwizzle &writemask) |
| ShVariantPtr | lowBoundVariant () const |
| Generates a new ShVariant holding the lower bound. | |
| ShVariantPtr | highBoundVariant () const |
| Generates a new ShVariant holding the upper bound. | |
| ShBindingType | kind () const |
| ShSemanticType | specialType () const |
| void | specialType (ShSemanticType) |
| const ShVariant * | getVariant () const |
| Retrieve the variant. | |
| ShVariant * | getVariant () |
| Retrieve the variant. This should probably only be used internally. | |
| void | addVariant () |
| Ensure this node has space to store host-side values. | |
| void * | operator new (std::size_t size) |
| void | operator delete (void *d) |
| virtual | ~ShVariableNode () |
| ShVariableNodePtr | clone (ShBindingType newKind=SH_BINDINGTYPE_END, int newSize=0, ShValueType newValueType=SH_VALUETYPE_END, ShSemanticType newType=SH_SEMANTICTYPE_END, bool updateVarList=true, bool keepUniform=true) const |
| Clones this ShVariableNode, copying all fields and meta data. | |
| std::string | nameOfType () const |
| Get a string of this var's specialType, kind, & size. | |
| void | setVariant (const ShVariant *other) |
| Set the elements of this' variant to those of other. | |
| void | setVariant (ShVariantCPtr other) |
| void | setVariant (const ShVariant *other, int index) |
| Update indexed element of this' variant. | |
| void | setVariant (ShVariantCPtr other, int index) |
| void | setVariant (const ShVariant *other, bool neg, const ShSwizzle &writemask) |
| Update elements of this' variant applying the given writemask and negation. | |
| void | setVariant (ShVariantCPtr other, bool neg, const ShSwizzle &writemask) |
| void | attach (const ShPointer< ShProgramNode > &evaluator) |
| Attaching a null program causes this uniform to no longer become dependent. | |
| void | update () |
| Reevaluate a dependent uniform. | |
| void | update_all () |
| const ShPointer< ShProgramNode > & | evaluator () const |
| Obtain the program defining this uniform, if any. | |
Protected Member Functions | |
| ShVariableNode (const ShVariableNode &old, ShBindingType newKind, int newSize, ShValueType newValueType, ShSemanticType newType, bool updateVarList, bool keepUniform) | |
| Creates a new variable node that holds the same data type as old. | |
| ShVariant * | makeLow () const |
| ShVariant * | makeHigh () const |
| void | programVarListInit () |
| void | programDeclInit () |
| Adds this to the declared temps set. | |
| void | add_dependent (ShVariableNode *dep) |
| void | remove_dependent (ShVariableNode *dep) |
| void | update_dependents () |
| void | detach_dependencies () |
Protected Attributes | |
| bool | m_uniform |
| ShBindingType | m_kind |
| ShSemanticType | m_specialType |
| ShValueType | m_valueType |
| int | m_size |
| int | m_id |
| int | m_locked |
| ShVariantPtr | m_variant |
| Ref-counted pointer to the variant. | |
| ShVariableNodeEval * | m_eval |
| std::list< ShVariableNode * > | m_dependents |
Static Protected Attributes | |
| static int | m_maxID |
| static ShPool * | m_pool |
Definition at line 50 of file ShVariableNode.hpp.
|
|
Ensure this node has space to store host-side values. Normally this is not necessary, but when uniforms are given dependent programs and evaluated all the temporaries will need to store values during an evaluation. Definition at line 423 of file ShVariableNode.cpp. References SH::ShVariantFactory::generate(), m_size, m_valueType, m_variant, and SH::shVariantFactory(). Referenced by ShVariableNode(). |
|
|
Does this variable have values in the host, e.g. for constants and uniforms. Definition at line 127 of file ShVariableNode.cpp. References m_variant. |
|
|
Adds this to the declared temps set. If current parsing program has cfg node (i.e. this is a transformation, not a new program specification), then adds to programs entry node. Else adds an SH_OP_DECL as a dummy statement into current parsing block. Definition at line 404 of file ShVariableNode.cpp. References SH::ShContext::current(), m_kind, m_uniform, SH::ShContext::parsing(), and SH::SH_OP_DECL. Referenced by ShVariableNode(). |
|
|
Ref-counted pointer to the variant. ShVariableNode is always the sole owner of this pointer once the node exists. Definition at line 227 of file ShVariableNode.hpp. Referenced by addVariant(), getVariant(), hasValues(), name(), setVariant(), and size(). |
1.4.3-20050530