Lines Matching defs:const

34 static rr::GenericVecType mapToGenericVecType (const rsg::VariableType& varType)
47 static glu::DataType mapToBasicType (const rsg::VariableType& varType)
51 const glu::DataType scalarType = varType.isFloatOrVec() ? glu::TYPE_FLOAT :
54 const int numComps = varType.getNumElements();
70 static void generateProgramDeclaration (sglr::pdec::ShaderProgramDeclaration& decl, const rsg::Shader& vertexShader, const rsg::Shader& fragmentShader, int numUnifiedUniforms, const rsg::ShaderInput* const* unifiedUniforms)
77 const rsg::ShaderInput* vertexInput = *vtxInIter;
83 const rsg::ShaderInput* fragInput = *fragInIter;
89 const rsg::ShaderInput* uniform = unifiedUniforms[uniformNdx];
96 static sglr::pdec::ShaderProgramDeclaration generateProgramDeclaration (const rsg::Shader& vertexShader, const rsg::Shader& fragmentShader, int numUnifiedUniforms, const rsg::ShaderInput* const* unifiedUniforms)
103 static const rsg::Variable* findShaderOutputByName (const rsg::Shader& shader, const char* name)
105 vector<const rsg::Variable*> outputs;
108 for (vector<const rsg::Variable*>::const_iterator iter = outputs.begin(); iter != outputs.end(); ++iter)
117 static const rsg::Variable* findShaderOutputByLocation (const rsg::Shader& shader, int location)
119 vector<const rsg::Variable*> outputs;
122 for (vector<const rsg::Variable*>::const_iterator iter = outputs.begin(); iter != outputs.end(); iter++)
131 RandomShaderProgram::RandomShaderProgram (const rsg::Shader& vertexShader, const rsg::Shader& fragmentShader, int numUnifiedUniforms, const rsg::ShaderInput* const* unifiedUniforms)
147 const rsg::ShaderInput* fragInput = *fragInIter;
148 const rsg::Variable* vertexOutput = findShaderOutputByName(vertexShader, fragInput->getVariable()->getName());
155 void RandomShaderProgram::refreshUniforms (void) const
161 const rsg::Variable* uniformVar = m_unifiedUniforms[uniformNdx]->getVariable();
162 const rsg::VariableType& uniformType = uniformVar->getType();
163 const sglr::UniformSlot& uniformSlot = m_uniforms[uniformNdx];
165 m_execCtx.getValue(uniformVar) = rsg::ConstValueAccess(uniformType, (const rsg::Scalar*)&uniformSlot.value).value();
169 void RandomShaderProgram::shadeVertices (const rr::VertexAttrib* inputs, rr::VertexPacket* const* packets, const int numPackets) const
178 const int numToExecute = de::min(numPackets-packetOffset, (int)rsg::EXEC_VEC_WIDTH);
183 const rsg::Variable* attribVar = m_vertexShader.getInputs()[attribNdx]->getVariable();
184 const rsg::VariableType& attribType = attribVar->getType();
185 const int numComponents = attribType.getNumElements();
192 const int packetNdx = ndx+packetOffset;
193 const rr::VertexPacket* packet = packets[packetNdx];
194 const tcu::Vec4 attribValue = rr::readVertexAttribFloat(inputs[attribNdx], packet->instanceNdx, packet->vertexNdx);
207 const rsg::ExecConstValueAccess access = m_execCtx.getValue(m_positionVar);
211 const int packetNdx = ndx+packetOffset;
224 const rsg::Variable* var = m_vertexOutputs[varNdx];
225 const rsg::VariableType& varType = var->getType();
226 const int numComponents = varType.getNumElements();
227 const rsg::ExecConstValueAccess access = m_execCtx.getValue(var);
233 const int packetNdx = ndx+packetOffset;
234 rr::VertexPacket* const packet = packets[packetNdx];
235 float* const dst = packet->outputs[varNdx].getAccess<float>();
248 void RandomShaderProgram::shadeFragments (rr::FragmentPacket* packets, const int numPackets, const rr::FragmentShadingContext& context) const
250 const rsg::ExecConstValueAccess fragColorAccess = m_execCtx.getValue(m_fragColorVar);
257 const int numPacketsToExecute = de::min(numPackets-packetOffset, (int)rsg::EXEC_VEC_WIDTH / (int)rr::NUM_FRAGMENTS_PER_PACKET);
262 const rsg::Variable* var = m_fragmentShader.getInputs()[varNdx]->getVariable();
263 const rsg::VariableType& varType = var->getType();
264 const int numComponents = varType.getNumElements();
271 const rr::FragmentPacket& packet = packets[packetOffset+packetNdx];
275 const tcu::Vec4 varValue = rr::readVarying<float>(packet, context, varNdx, fragNdx);
276 const int dstNdx = packetNdx*rr::NUM_FRAGMENTS_PER_PACKET + fragNdx;
293 const int srcNdx = packetNdx*rr::NUM_FRAGMENTS_PER_PACKET + fragNdx;
294 const tcu::Vec4 color (fragColorAccess.component(0).asFloat(srcNdx),