Lines Matching defs:format
212 /* Texture format descriptor. Maps texture format with output channel descriptors, source data and sampler descriptor */
1194 const _out_ch_desc& get_descriptor_for_channel(const _texture_format& format, const size_t channel);
1299 /** Extracts value of each channel from source data of given format
1301 * @param format_idx Index of format
1306 const _texture_format& format = texture_formats[format_idx];
1318 switch (format.m_format)
1357 TCU_FAIL("Unsupported format");
1361 if ((GL_SRGB8 == format.m_internal_format) || (GL_SRGB8_ALPHA8 == format.m_internal_format))
1379 else if (GL_UNSIGNED_BYTE_3_3_2 == format.m_type)
1381 const glw::GLubyte* ptr = (const glw::GLubyte*)format.m_source_data;
1394 else if (GL_UNSIGNED_SHORT_5_6_5 == format.m_type)
1396 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1409 else if (GL_UNSIGNED_SHORT_4_4_4_4 == format.m_type)
1411 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1427 else if (GL_UNSIGNED_SHORT_5_5_5_1 == format.m_type)
1429 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1445 else if (GL_UNSIGNED_INT_10_10_10_2 == format.m_type)
1447 const glw::GLuint* ptr = (const glw::GLuint*)format.m_source_data;
1466 else if (GL_UNSIGNED_INT_10F_11F_11F_REV == format.m_type)
1472 else if (GL_UNSIGNED_INT_5_9_9_9_REV == format.m_type)
1476 else if (GL_UNSIGNED_INT_24_8 == format.m_type)
1480 else if (GL_FLOAT_32_UNSIGNED_INT_24_8_REV == format.m_type)
1484 else if (GL_BYTE == format.m_type)
1486 const glw::GLbyte* ptr = (const glw::GLbyte*)format.m_source_data;
1498 else if (GL_UNSIGNED_BYTE == format.m_type)
1500 const glw::GLubyte* ptr = (const glw::GLubyte*)format.m_source_data;
1512 else if (GL_SHORT == format.m_type)
1514 const glw::GLshort* ptr = (const glw::GLshort*)format.m_source_data;
1526 else if (GL_UNSIGNED_SHORT == format.m_type)
1528 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1540 else if (GL_INT == format.m_type)
1542 const glw::GLint* ptr = (const glw::GLint*)format.m_source_data;
1554 else if (GL_UNSIGNED_INT == format.m_type)
1556 const glw::GLuint* ptr = (const glw::GLuint*)format.m_source_data;
1568 else if (GL_FLOAT == format.m_type)
1570 const glw::GLfloat* ptr = (const glw::GLfloat*)format.m_source_data;
1580 else if (GL_HALF_FLOAT == format.m_type)
1582 const glw::GLhalf* ptr = (const glw::GLhalf*)format.m_source_data;
1632 * @param source_format_idx Index of source format
1633 * @param output_format_idx Index of output format
1764 /* Clamp to limits of output format */
1802 /** Gets index of internal format in texture_fomrats
1804 * @param internal_format Internal format to be found
1806 * @return Found index. -1 when format is not available. 0 when GL_ZERO is requested.
1823 TCU_FAIL("Unknown internal format");
1831 * @return Found index. -1 when format is not available. 0 when GL_ZERO is requested.
1896 /** Gets descriptor of output channel from texture format descriptor
1898 * @param format Format descriptor
1903 const _out_ch_desc& get_descriptor_for_channel(const _texture_format& format, const size_t channel)
1910 desc = &format.m_one_ch;
1913 desc = &format.m_zero_ch;
1916 desc = &format.m_red_ch;
1919 desc = &format.m_green_ch;
1922 desc = &format.m_blue_ch;
1925 desc = &format.m_alpha_ch;
1934 desc = &format.m_one_ch;
1937 desc = &format.m_zero_ch;
1946 /** Gets internal_format of output channel for given texture format
1948 * @param format Format descriptor
1951 * @return Internal format
1953 glw::GLenum get_internal_format_for_channel(const _texture_format& format, const size_t channel)
1955 return get_descriptor_for_channel(format, channel).m_internal_format;
2572 * @param output_format_index Index of format used by output texture
2708 * @param format_idx Index of format
2762 * @param output_format_index Index of output format
2983 /** Check if target is supported by format
2985 * @param format_idx Index of format
2992 const _texture_format& format = texture_formats[format_idx];
2997 switch (format.m_internal_format)
3074 * @param output_format_index Index of format used by output texture
3392 * @param format_idx Index of texture format
3398 const _texture_format& format = texture_formats[format_idx];
3406 gl.texImage2D(GL_TEXTURE_2D, 0 /* level */, format.m_internal_format, m_output_width, m_output_height,
3407 0 /* border */, format.m_format, format.m_type, 0 /* pixels */);
3436 * @param format_idx Index of texture format
3451 const glw::GLenum format = texture_format.m_format;
3477 gl.texImage1D(target, level, internal_format, m_width, border, format, type, 0 /* pixels */);
3486 gl.texImage2D(target, level, internal_format, m_width, m_height, border, format, type, 0 /* pixels */);
3494 gl.texImage3D(target, level, internal_format, m_width, m_height, m_depth, border, format, type, 0 /* pixels */);
3503 gl.texImage2D(cube_map_faces[i], level, internal_format, m_width, m_height, border, format, type,
3763 /* Check that format is supported by context. */
3928 * @param format_idx Index of format
4010 * @param format_idx Index of format
4018 const _texture_format& format = texture_formats[format_idx];
4034 gl.texSubImage1D(target, 0 /* level */, 0 /* x */, m_width, format.m_format, format.m_type,
4035 format.m_source_data);
4043 gl.texSubImage2D(target, 0 /* level */, 0 /* x */, 0 /* y */, m_width, m_height, format.m_format, format.m_type,
4044 format.m_source_data);
4052 format.m_format, format.m_type, format.m_source_data);
4060 gl.texSubImage2D(cube_map_faces[i], 0 /* level */, 0 /* x */, 0 /* y */, m_width, m_height, format.m_format,
4061 format.m_type, format.m_source_data);
4087 * @param format_idx Index of texture format
4102 const _texture_format& format = texture_formats[format_idx];
4109 Utils::replaceToken("PREFIX", position, format.m_sampler.m_sampler_prefix, fs);
4110 Utils::replaceToken("PREFIX", position, format.m_sampler.m_sampler_prefix, fs);
4118 * @param format_idx Index of texture format
4163 * @param output_format_index Index of format used by output texture