Home | History | Annotate | Download | only in common

Lines Matching defs:variable

28         const InterfaceBlockField &variable = fields[fieldIndex];
30 if (variable.fields.size() > 0)
32 const unsigned int elementCount = std::max(1u, variable.arraySize);
37 encodeInterfaceBlockFields(variable.fields);
43 encodeInterfaceBlockField(variable);
248 void HLSLVariableGetRegisterInfo(unsigned int baseRegisterIndex, gl::Uniform *variable, HLSLBlockEncoder *encoder,
252 // we can ignore the array size of the variable
254 if (variable->isStruct())
258 variable->registerIndex = baseRegisterIndex;
260 for (size_t fieldIndex = 0; fieldIndex < variable->fields.size(); fieldIndex++)
262 HLSLVariableGetRegisterInfo(baseRegisterIndex, &variable->fields[fieldIndex], encoder, blockInfo, outputType);
267 if (variable->isArray())
269 unsigned int structRegisterCount = (HLSLVariableRegisterCount(*variable, outputType) / variable->arraySize);
270 encoder->skipRegisters(structRegisterCount * (variable->arraySize - 1));
277 encoder->encodeType(variable->type, variable->arraySize, false);
280 variable->registerIndex = baseRegisterIndex + (blockInfo.back().offset / registerBytes);
281 variable->elementIndex = (blockInfo.back().offset % registerBytes) / sizeof(float);
285 void HLSLVariableGetRegisterInfo(unsigned int baseRegisterIndex, gl::Uniform *variable, ShShaderOutput outputType)
291 HLSLVariableGetRegisterInfo(baseRegisterIndex, variable, &encoder, blockInfo, outputType);
295 void HLSLVariableRegisterCount(const ShaderVarType &variable, HLSLBlockEncoder *encoder)
297 if (variable.isStruct())
299 for (size_t arrayElement = 0; arrayElement < variable.elementCount(); arrayElement++)
303 for (size_t fieldIndex = 0; fieldIndex < variable.fields.size(); fieldIndex++)
305 HLSLVariableRegisterCount(variable.fields[fieldIndex], encoder);
314 encoder->encodeType(variable.type, variable.arraySize, false);
318 unsigned int HLSLVariableRegisterCount(const Varying &variable)
321 HLSLVariableRegisterCount(variable, &encoder);
327 unsigned int HLSLVariableRegisterCount(const Uniform &variable, ShShaderOutput outputType)
333 HLSLVariableRegisterCount(variable, &encoder);