Lines Matching refs:data
299 * @param [in] UploadDataFunction Function pointer to the tested data uploading function.
323 glw::GLuint* data = (glw::GLuint*)gl.mapBuffer(GL_ARRAY_BUFFER, GL_READ_ONLY);
326 is_ok = compare(data, s_reference, s_reference_count);
330 LogFail(UploadDataFunction, parameter, data, s_reference, s_reference_count);
358 /** @brief NamedBufferData data upload function.
381 /** @brief NamedBufferSubData data upload function.
408 /** @brief NamedBufferStorage data upload function.
427 /** @brief CopyNamedBufferSubData data upload function (uses auxiliary buffer object).
486 * @param [in] data Data to be compared.
487 * @param [in] reference Reference data to be compared to.
490 * @return True if count of data the elements are equal to reference counterparts, false otherwise.
492 bool DataTest::compare(const glw::GLuint* data, const glw::GLuint* reference, const glw::GLsizei count)
496 if (data[i] != reference[i])
512 * @param [in] data Data which was downloaded.
513 * @param [in] reference Reference data.
517 const glw::GLuint* data, const glw::GLuint* reference, const glw::GLsizei count)
564 the_log.append(". Buffer data is equal to [");
570 number << data[i];
655 }; //!< Reference data.
656 const glw::GLsizei DataTest::s_reference_size = sizeof(s_reference); //!< Size of the reference data.
658 s_reference_size / sizeof(s_reference[0]); //!< NUmber of elements of the reference data.
681 * @param [in] size Size of the data.
682 * @param [in] format GL Format of the data.
683 * @param [in] type GL Type of the data element.
684 * @param [in] data Data to be cleared with.
688 glw::GLenum format, glw::GLenum type, glw::GLvoid* data)
694 m_pClearNamedBufferData(buffer, internalformat, format, type, data);
704 * @param [in] size Size of the data.
705 * @param [in] format GL Format of the data.
706 * @param [in] type GL Type of the data element.
707 * @param [in] data Data to be cleared with.
711 glw::GLenum format, glw::GLenum type, glw::GLvoid* data)
716 m_pClearNamedBufferSubData(buffer, internalformat, 0, size, format, type, data);
722 * @param [in] data Data to be compared.
723 * @param [in] reference Reference data to be compared to.
726 * @return True if count of data the elements are equal to reference counterparts, false otherwise.
729 bool ClearTest::Compare<glw::GLfloat>(const glw::GLfloat* data, const glw::GLfloat* reference, const glw::GLsizei count)
733 if (de::abs(data[i] - reference[i]) > 0.00001 /* Precision. */)
743 * @tparam T Type of data to be compared (anything which is not GLfloat.
747 * @param [in] data Data to be compared.
748 * @param [in] reference Reference data to be compared to.
751 * @return True if count of data the elements are equal to reference counterparts, false otherwise.
754 bool ClearTest::Compare(const T* data, const T* reference, const glw::GLsizei count)
758 if (data[i] != reference[i])
768 * @tparam T Type of data to which was tested.
771 * @param [in] data Data which was used for clear test.
772 * @param [in] reference Reference data.
776 void ClearTest::LogFail(bool use_sub_data, glw::GLenum internalformat, const T* data, const T* reference,
792 the_log.append(". Cleared buffer data is equal to [");
798 number << data[i];
850 * @tparam T Type of data to which to be tested.
856 * @param [in] data Data to be used with clear test.
862 glw::GLenum type, T* data)
880 type, data);
888 is_ok = Compare<T>(_data, data, count);
893 LogFail<T>(USE_SUB_DATA, internalformat, _data, data, count);
1185 /* Buffer's storage allocation and reference data upload. */
1190 glw::GLuint* data = (glw::GLuint*)m_pMapNamedBuffer(buffer, GL_READ_ONLY);
1193 if (DE_NULL == data)
1197 << tcu::TestLog::Message << "glMapNamedBuffer returned NULL pointer, but buffer's data was expected."
1202 /* Comparison results with reference data. */
1205 is_ok &= (data[i] == s_reference[i]);
1213 << "glMapNamedBuffer returned pointer to data which is not identical to reference data."
1329 /* Buffer's storage allocation and reference data upload. */
1334 glw::GLuint* data = (glw::GLuint*)m_pMapNamedBuffer(buffer, GL_READ_WRITE);
1337 if (DE_NULL == data)
1341 << tcu::TestLog::Message << "glMapNamedBuffer returned NULL pointer, but buffer's data was expected."
1346 /* Comparison results with reference data. */
1349 is_ok &= (data[i] == s_reference[i]);
1357 << "glMapNamedBuffer returned pointer to data which is not identical to reference data."
1361 /* Writting inverted reference data. */
1364 data[i] = s_reference[s_reference_count - i - 1];
1380 data = DE_NULL;
1382 data = (glw::GLuint*)m_pMapNamedBuffer(buffer, GL_READ_WRITE);
1385 if (DE_NULL == data)
1390 << "glMapNamedBuffer returned NULL pointer, but buffer's data was expected."
1395 /* Comparison results with inverted reference data. */
1398 is_ok &= (data[i] == s_reference[s_reference_count - i - 1]);
1456 }; //!< Reference data.
1457 const glw::GLsizei MapReadWriteTest::s_reference_size = sizeof(s_reference); //!< Reference data size.
1459 s_reference_size / sizeof(s_reference[0]); //!< Reference data elements' count.
1522 glw::GLuint* data = (glw::GLuint*)m_pMapNamedBuffer(buffer, GL_WRITE_ONLY);
1525 if (DE_NULL == data)
1529 << tcu::TestLog::Message << "glMapNamedBuffer returned NULL pointer, but buffer's data was expected."
1534 /* Reference data upload. */
1537 data[i] = s_reference[i];
1553 /* Mapping data, the old way. */
1557 data = DE_NULL;
1559 data = (glw::GLuint*)gl.mapBuffer(GL_ARRAY_BUFFER, GL_READ_ONLY);
1562 /* Comparison results with reference data. */
1565 is_ok &= (data[i] == s_reference[i]);
1573 << "glMapNamedBuffer, called with GL_WRITE_ONLY access flag, had not stored the reference data."
1621 }; //!< Reference data.
1622 const glw::GLsizei MapWriteOnlyTest::s_reference_size = sizeof(s_reference); //!< Reference data size.
1624 s_reference_size / sizeof(s_reference[0]); //!< Reference data elements' count.
1690 /* Buffer's storage allocation and reference data upload. */
1695 glw::GLuint* data = (glw::GLuint*)m_pMapNamedBufferRange(buffer, 0, s_reference_size / 2, access_flags[i]);
1699 is_ok &= CompareWithReference(data, 0, s_reference_size / 2);
1706 data = (glw::GLuint*)m_pMapNamedBufferRange(buffer, s_reference_size / 2, s_reference_size / 2,
1711 is_ok &= CompareWithReference(data, s_reference_size / 2, s_reference_size / 2);
1766 * @param [in] data Data to be compared.
1767 * @param [in] offset Offset in the reference data.
1768 * @param [in] length Length of the data to be compared.
1772 bool MapRangeReadBitTest::CompareWithReference(glw::GLuint* data, glw::GLintptr offset, glw::GLsizei length)
1774 if (DE_NULL == data)
1779 << length << " returned NULL pointer, but buffer's data was expected." << tcu::TestLog::EndMessage;
1786 /* Comparison results with reference data. */
1793 if (data[i - start] != s_reference[i])
1798 << length << " returned pointer to data which is not identical to reference data."
1814 }; //!< Reference data.
1815 const glw::GLsizei MapRangeReadBitTest::s_reference_size = sizeof(s_reference); //!< Reference data size.
1817 s_reference_size / sizeof(s_reference[0]); //!< Reference data elements' count.
1897 /* Buffer's storage allocation and reference data upload. */
1902 glw::GLuint* data =
1909 data[j] = s_reference[j];
1928 data = (glw::GLuint*)m_pMapNamedBufferRange(buffer, s_reference_size / 2, s_reference_size / 2,
1935 data[j] = s_reference[j + s_reference_count / 2];
1953 /* Check that previous mappings correctly filled buffer with reference data. */
2019 glw::GLuint* data = (glw::GLuint*)gl.mapBuffer(GL_ARRAY_BUFFER, GL_READ_ONLY);
2025 if (DE_NULL != data)
2027 /* Comparison results with reference data. */
2030 if (data[i] != s_reference[i])
2057 << " failed to fill the buffer with reference data." << tcu::TestLog::EndMessage;
2075 }; //!< Reference data.
2076 const glw::GLsizei MapRangeWriteBitTest::s_reference_size = sizeof(s_reference); //!< Reference data size.
2078 s_reference_size / sizeof(s_reference[0]); //!< Reference data elements' count.
2085 }; //!< Reference data.
2086 const glw::GLsizei SubDataQueryTest::s_reference_size = sizeof(s_reference); //!< Reference data size.
2088 s_reference_size / sizeof(s_reference[0]); //!< Reference data elements' count.
2142 /* Buffer's storage allocation and reference data upload. */
2147 glw::GLuint data[s_reference_count] = {};
2148 m_pGetNamedBufferSubData(buffer, 0, s_reference_size / 2, data);
2151 m_pGetNamedBufferSubData(buffer, s_reference_size / 2, s_reference_size / 2, &data[s_reference_count / 2]);
2154 /* Comparison results with reference data. */
2157 is_ok &= (data[i] == s_reference[i]);
2165 << "glGetNamedBufferSubData returned data which is not identical to reference data."
2291 /* Test data for glGetNamedBufferParameteri*v. */
2312 glw::GLint data = -1;
2314 m_pGetNamedBufferParameteriv(buffer, test_values[i].pname, &data);
2318 is_ok &= CheckValue<glw::GLint>(data, test_values[i].expected_data, test_values[i].pname_string,
2325 glw::GLint64 data = -1;
2327 m_pGetNamedBufferParameteri64v(buffer, test_values[i].pname, &data);
2331 is_ok &= CheckValue<glw::GLint64>(data, (glw::GLint64)test_values[i].expected_data,
2337 glw::GLvoid* data = (glw::GLvoid*)1;
2339 m_pGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &data);
2343 is_ok &= CheckValue<glw::GLvoid*>(data, (glw::GLvoid*)DE_NULL, "GL_BUFFER_MAP_POINTER",
5050 }; //!< Initial data to be uploaded for the input buffer.
5054 }; //!< Initial data to be uploaded for the output buffer.
5654 << "GetNamedBufferParameteriv has not returned a data."
5700 << "GetNamedBufferParameteri64v has not returned a data."
5719 /* Local data storage. */
5722 /* Fetch data. */
5732 m_context.getTestContext().getLog() << tcu::TestLog::Message << "Expected data is not equal to results."