Lines Matching refs:variable
95 ValueEntry::ValueEntry (const Variable* variable) in ValueEntry() argument
96 : m_variable (variable) in ValueEntry()
97 , m_valueRange (variable->getType()) in ValueEntry()
116 Variable* variable = new Variable(type, storage, name); in allocate() local
119 m_liveVariables.push_back(variable); in allocate()
120 return variable; in allocate()
124 delete variable; in allocate()
129 void VariableScope::declare (Variable* variable) in declare() argument
131 m_declaredVariables.push_back(variable); in declare()
132 removeLive(variable); in declare()
135 void VariableScope::removeLive (const Variable* variable) in removeLive() argument
137 …tor<Variable*>::iterator pos = std::find(m_liveVariables.begin(), m_liveVariables.end(), variable); in removeLive()
160 ValueEntry* ValueScope::allocate (const Variable* variable) in allocate() argument
162 ValueEntry* entry = new ValueEntry(variable); in allocate()
178 CompareEntryVariable (const Variable* variable) in CompareEntryVariable() argument
179 : m_variable(variable) in CompareEntryVariable()
197 ValueEntry* ValueScope::findEntry (const Variable* variable) const in findEntry()
199 …const_iterator pos = std::find(m_entries.begin(), m_entries.end(), CompareEntryVariable(variable)); in findEntry()
203 void ValueScope::setValue (const Variable* variable, ConstValueRangeAccess value) in setValue() argument
205 ValueEntry* entry = findEntry(variable); in setValue()
213 void ValueScope::removeValue (const Variable* variable) in removeValue() argument
215 …ry*>::iterator pos = std::find(m_entries.begin(), m_entries.end(), CompareEntryVariable(variable)); in removeValue()
249 Variable* variable = varScope.allocate(type, Variable::STORAGE_LOCAL, name); in allocate() local
252 ValueEntry* valueEntry = valueScope.allocate(variable); in allocate()
260 setStorage(variable, storage); in allocate()
262 return variable; in allocate()
265 void VariableManager::setStorage (Variable* variable, Variable::Storage storage) in setStorage() argument
267 int numScalars = variable->getType().getScalarSize(); in setStorage()
270 if (variable->getStorage() == Variable::STORAGE_SHADER_IN) in setStorage()
275 else if (variable->getStorage() == Variable::STORAGE_UNIFORM) in setStorage()
287 variable->setStorage(storage); in setStorage()
290 bool VariableManager::canDeclareInCurrentScope (const Variable* variable) const in canDeclareInCurrentScope()
293 return std::find(curLiveVars.begin(), curLiveVars.end(), variable) != curLiveVars.end(); in canDeclareInCurrentScope()
301 void VariableManager::declareVariable (Variable* variable) in declareVariable() argument
304 …iterator pos = std::find(m_entryCache.begin(), m_entryCache.end(), CompareEntryVariable(variable)); in declareVariable()
308 …DE_ASSERT(std::find(m_entryCache.begin(), m_entryCache.end(), CompareEntryVariable(variable)) == m… in declareVariable()
314 scope->removeValue(variable); in declareVariable()
318 getCurVariableScope().declare(variable); in declareVariable()
321 const ValueEntry* VariableManager::getValue (const Variable* variable) const in getValue()
323 …iterator pos = std::find(m_entryCache.begin(), m_entryCache.end(), CompareEntryVariable(variable)); in getValue()
327 void VariableManager::removeValueFromCurrentScope (const Variable* variable) in removeValueFromCurrentScope() argument
330 …iterator pos = std::find(m_entryCache.begin(), m_entryCache.end(), CompareEntryVariable(variable)); in removeValueFromCurrentScope()
335 getCurValueScope().removeValue(variable); in removeValueFromCurrentScope()
338 const ValueEntry* VariableManager::getParentValue (const Variable* variable) const in getParentValue()
346 ValueEntry* entry = scope->findEntry(variable); in getParentValue()
355 void VariableManager::setValue (const Variable* variable, ConstValueRangeAccess value) in setValue() argument
359 if (!curScope.findEntry(variable)) in setValue()
362 ValueEntry* newEntry = curScope.allocate(variable); in setValue()
363 …tor cachePos = std::find(m_entryCache.begin(), m_entryCache.end(), CompareEntryVariable(variable)); in setValue()
371 curScope.setValue(variable, value); in setValue()