Lines Matching defs:uniform
595 const Uniform& uniform = *uniformIter;
596 computeStd140Layout(layout, curOffset, activeBlockNdx, blockPrefix + uniform.getName(), uniform.getType(), mergeLayoutFlags(block.getFlags(), uniform.getFlags()));
613 // Compute active uniform set for block.
814 void generateDeclaration (std::ostringstream& src, const Uniform& uniform, int indentLevel);
909 void generateDeclaration (std::ostringstream& src, const Uniform& uniform, int indentLevel)
911 if ((uniform.getFlags() & LAYOUT_MASK) != 0)
912 src << "layout(" << LayoutFlagsFmt(uniform.getFlags() & LAYOUT_MASK) << ") ";
914 generateDeclaration(src, uniform.getType(), uniform.getName(), indentLevel, uniform.getFlags() & UNUSED_BOTH);
922 src << "uniform " << block.getBlockName();
1084 const Uniform& uniform = *uniformIter;
1086 if (uniform.getFlags() & unusedMask)
1087 continue; // Don't read from that uniform.
1089 generateCompareSrc(src, resultVar, uniform.getType(), (srcPrefix + uniform.getName()).c_str(), (apiPrefix + uniform.getName()).c_str(), layout, basePtr, unusedMask);
1178 GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to get number of uniforms and uniform blocks");
1235 GLU_EXPECT_NO_ERROR(gl.getError(), "Active uniform query failed");
1371 GLU_EXPECT_NO_ERROR(m_renderCtx.getFunctions().getError(), "Failed to allocate uniform buffer");
1483 // Assign binding points to all active uniform blocks.
1490 GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to set uniform block bindings");
1515 GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to upload uniform buffer data");
1560 GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to upload uniform buffer data");
1795 // Check uniform block indices.
1798 const UniformLayoutEntry& uniform = layout.uniforms[uniformNdx];
1800 if (uniform.blockNdx < 0 || !deInBounds32(uniform.blockNdx, 0, numBlocks))
1802 log << TestLog::Message << "Error: Invalid block index in uniform '" << uniform.name << "'" << TestLog::EndMessage;
1816 log << TestLog::Message << "Error: Invalid active uniform index " << *uniformIter << " in block '" << block.name << "'" << TestLog::EndMessage;
1833 const UniformLayoutEntry& uniform = layout.uniforms[uniformNdx];
1835 if (uniform.blockNdx < 0)
1838 const BlockLayoutEntry& block = layout.blocks[uniform.blockNdx];
1839 bool isMatrix = glu::isDataTypeMatrix(uniform.type);
1840 int numVecs = isMatrix ? (uniform.isRowMajor ? glu::getDataTypeMatrixNumRows(uniform.type) : glu::getDataTypeMatrixNumColumns(uniform.type)) : 1;
1841 int numComps = isMatrix ? (uniform.isRowMajor ? glu::getDataTypeMatrixNumColumns(uniform.type) : glu::getDataTypeMatrixNumRows(uniform.type)) : glu::getDataTypeScalarSize(uniform.type);
1842 int numElements = uniform.size;
1850 minOffset = de::min(minOffset, (numVecs-1)*uniform.matrixStride);
1851 minOffset = de::min(minOffset, (numElements-1)*uniform.arrayStride);
1852 minOffset = de::min(minOffset, (numElements-1)*uniform.arrayStride + (numVecs-1)*uniform.matrixStride);
1855 maxOffset = de::max(maxOffset, (numVecs-1)*uniform.matrixStride + vecSize);
1856 maxOffset = de::max(maxOffset, (numElements-1)*uniform.arrayStride + vecSize);
1857 maxOffset = de::max(maxOffset, (numElements-1)*uniform.arrayStride + (numVecs-1)*uniform.matrixStride + vecSize);
1859 if (uniform.offset+minOffset < 0 || uniform.offset+maxOffset > block.size)
1861 log << TestLog::Message << "Error: Uniform '" << uniform.name << "' out of block bounds" << TestLog::EndMessage;
1875 // \note Spec mandates that uniform blocks are assigned consecutive locations from 0