Lines Matching defs:const
51 static const glw::GLhalf data_float16_one[] = { tcu::Float16(1.0).bits() };
52 static const glw::GLhalf data_float16_zero[] = { tcu::Float16(0.0).bits() };
53 static const glw::GLfloat data_float32_one[] = { 1.0f };
54 static const glw::GLfloat data_float32_zero[] = { 0.0f };
55 static const glw::GLbyte data_snorm8_zero[] = { 0 };
56 static const glw::GLbyte data_snorm8_one[] = { 127 };
57 static const glw::GLshort data_snorm16_one[] = { 32767 };
58 static const glw::GLshort data_snorm16_zero[] = { 0 };
59 static const glw::GLubyte data_unorm8_one[] = { 255 };
60 static const glw::GLubyte data_unorm8_zero[] = { 0 };
61 static const glw::GLushort data_unorm16_one[] = { 65535 };
62 static const glw::GLushort data_unorm16_zero[] = { 0 };
63 static const glw::GLbyte data_sint8_zero[] = { 0 };
64 static const glw::GLbyte data_sint8_one[] = { 1 };
65 static const glw::GLshort data_sint16_one[] = { 1 };
66 static const glw::GLshort data_sint16_zero[] = { 0 };
67 static const glw::GLint data_sint32_one[] = { 1 };
68 static const glw::GLint data_sint32_zero[] = { 0 };
69 static const glw::GLubyte data_uint8_one[] = { 1 };
70 static const glw::GLubyte data_uint8_zero[] = { 0 };
71 static const glw::GLushort data_uint16_one[] = { 1 };
72 static const glw::GLushort data_uint16_zero[] = { 0 };
73 static const glw::GLuint data_uint32_one[] = { 1 };
74 static const glw::GLuint data_uint32_zero[] = { 0 };
77 static const glw::GLubyte src_data_r8[] = { 123 };
78 static const glw::GLbyte src_data_r8_snorm[] = { -123 };
79 static const glw::GLushort src_data_r16[] = { 12345 };
80 static const glw::GLshort src_data_r16_snorm[] = { -12345 };
81 static const glw::GLubyte src_data_rg8[] = { 123, 231 };
82 static const glw::GLbyte src_data_rg8_snorm[] = { -123, -23 };
83 static const glw::GLushort src_data_rg16[] = { 12345, 54321 };
84 static const glw::GLshort src_data_rg16_snorm[] = { -12345, -23451 };
85 static const glw::GLubyte src_data_r3_g3_b2[] = { 236 }; /* 255, 109, 0 */
86 static const glw::GLushort src_data_rgb4[] = { 64832 }; /* 5_6_5: 255, 170, 0 */
87 static const glw::GLushort src_data_rgb5[] = { 64832 };
88 static const glw::GLubyte src_data_rgb8[] = { 3, 2, 1 };
89 static const glw::GLbyte src_data_rgb8_snorm[] = { -1, -2, -3 };
90 static const glw::GLushort src_data_rgb16[] = { 65535, 32767, 16383 };
91 static const glw::GLshort src_data_rgb16_snorm[] = { -32767, -16383, -8191 };
92 static const glw::GLushort src_data_rgba4[] = { 64005 }; /* 255, 170, 0, 85 */
93 static const glw::GLushort src_data_rgb5_a1[] = { 64852 };
94 static const glw::GLubyte src_data_rgba8[] = { 0, 64, 128, 255 };
95 static const glw::GLbyte src_data_rgba8_snorm[] = { -127, -63, -32, -16 };
96 static const glw::GLuint src_data_rgb10_a2[] = { 4291823615u };
97 static const glw::GLushort exp_data_rgb10_a2ui[] = { 1023, 256, 511, 3 };
98 static const glw::GLushort src_data_rgba16[] = { 65535, 32767, 16383, 8191 };
99 static const glw::GLshort src_data_rgba16_snorm[] = { -32767, -16383, -8191, -4091 };
100 static const glw::GLubyte exp_data_srgb8_alpha8[] = { 13, 1, 255, 32 }; /* See 4.5 core 8.24 */
101 static const glw::GLubyte src_data_srgb8_alpha8[] = { 64, 8, 255, 32 };
102 static const glw::GLhalf src_data_r16f[] = { tcu::Float16(1.0).bits() };
103 static const glw::GLhalf src_data_rg16f[] = { tcu::Float16(1.0).bits(), tcu::Float16(-1.0).bits() };
104 static const glw::GLhalf src_data_rgb16f[] = { tcu::Float16(1.0).bits(), tcu::Float16(-1.0).bits(),
106 static const glw::GLhalf src_data_rgba16f[] = { tcu::Float16(1.0).bits(), tcu::Float16(-1.0).bits(),
108 static const glw::GLfloat src_data_r32f[] = { 1.0f };
109 static const glw::GLfloat src_data_rg32f[] = { 1.0f, -1.0f };
110 static const glw::GLfloat src_data_rgb32f[] = { 1.0f, -1.0f, 2.0f };
111 static const glw::GLfloat src_data_rgba32f[] = { 1.0f, -1.0f, 2.0f, -2.0f };
113 static const tcu::Float<deUint32, 5, 6, 15, tcu::FLOAT_SUPPORT_DENORM> r11f(0.5);
114 static const tcu::Float<deUint32, 5, 6, 15, tcu::FLOAT_SUPPORT_DENORM> g11f(0.75);
115 static const tcu::Float<deUint32, 5, 5, 15, tcu::FLOAT_SUPPORT_DENORM> b10f(0.25);
117 static const glw::GLhalf exp_data_r11f_g11f_b10f[] = { tcu::Float16(0.5).bits(), tcu::Float16(0.75).bits(),
119 static const glw::GLuint src_data_r11f_g11f_b10f[] = { (r11f.bits()) | (g11f.bits() << 11) | (b10f.bits() << 22) };
120 static const glw::GLfloat exp_data_rgb9_e5[] = { 31.0f, 23.0f, 32.0f };
121 static const glw::GLuint src_data_rgb9_e5[] = { 2885775608u };
122 static const glw::GLbyte src_data_r8i[] = { -127 };
123 static const glw::GLubyte src_data_r8ui[] = { 128 };
124 static const glw::GLshort src_data_r16i[] = { -32767 };
125 static const glw::GLushort src_data_r16ui[] = { 32768 };
126 static const glw::GLint src_data_r32i[] = { -1 };
127 static const glw::GLuint src_data_r32ui[] = { 1 };
128 static const glw::GLbyte src_data_rg8i[] = { -127, -126 };
129 static const glw::GLubyte src_data_rg8ui[] = { 128, 129 };
130 static const glw::GLshort src_data_rg16i[] = { -32767, -32766 };
131 static const glw::GLushort src_data_rg16ui[] = { 32768, 32769 };
132 static const glw::GLint src_data_rg32i[] = { -1, -2 };
133 static const glw::GLuint src_data_rg32ui[] = { 1, 2 };
134 static const glw::GLbyte src_data_rgb8i[] = { -127, -126, -125 };
135 static const glw::GLubyte src_data_rgb8ui[] = { 128, 129, 130 };
136 static const glw::GLshort src_data_rgb16i[] = { -32767, -32766, -32765 };
137 static const glw::GLushort src_data_rgb16ui[] = { 32768, 32769, 32770 };
138 static const glw::GLint src_data_rgb32i[] = { -1, -2, -3 };
139 static const glw::GLuint src_data_rgb32ui[] = { 1, 2, 3 };
140 static const glw::GLbyte src_data_rgba8i[] = { -127, -126, -125, -124 };
141 static const glw::GLubyte src_data_rgba8ui[] = { 128, 129, 130, 131 };
142 static const glw::GLshort src_data_rgba16i[] = { -32767, -32766, -32765, -32764 };
143 static const glw::GLushort src_data_rgba16ui[] = { 32768, 32769, 32770, 32771 };
144 static const glw::GLint src_data_rgba32i[] = { -1, -2, -3, -4 };
145 static const glw::GLuint src_data_rgba32ui[] = { 1, 2, 3, 4 };
146 static const glw::GLushort src_data_depth_component16[] = { 32768 };
147 static const glw::GLfloat exp_data_depth_component32[] = { 1.0f };
148 static const glw::GLuint src_data_depth_component32[] = { 4294967295u };
149 static const glw::GLfloat src_data_depth_component32f[] = { 0.75f };
150 static const glw::GLuint src_data_depth24_stencil8[] = { 4294967041u /* 1.0, 1 */ };
151 static const glw::GLuint src_data_depth32f_stencil8[] = { 1065353216, 1 /* 1.0f, 1 */ };
154 static const glw::GLchar* channels[] = { "r", "g", "b", "a" };
157 static const glw::GLenum cube_map_faces[] = { GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
160 static const size_t n_cube_map_faces = sizeof(cube_map_faces) / sizeof(cube_map_faces[0]);
163 static const glw::GLenum states[] = { GL_TEXTURE_SWIZZLE_R, GL_TEXTURE_SWIZZLE_G, GL_TEXTURE_SWIZZLE_B,
165 static const size_t n_states = sizeof(states) / sizeof(states[0]);
170 const glw::GLchar* m_basic_type;
171 const glw::GLchar* m_sampler_prefix;
173 static const _sampler isampler = { "int", "i" };
174 static const _sampler usampler = { "uint", "u" };
175 static const _sampler sampler = { "float", "" };
181 const glw::GLvoid* m_expected_data;
185 static const _out_ch_desc zero_ch = { GL_ZERO, 0 };
186 static const _out_ch_desc one_ch = { GL_ONE, 0 };
187 static const _out_ch_desc float16_zero = { GL_R16F, data_float16_zero };
188 static const _out_ch_desc float16_one = { GL_R16F, data_float16_one };
189 static const _out_ch_desc float32_zero = { GL_R32F, data_float32_zero };
190 static const _out_ch_desc float32_one = { GL_R32F, data_float32_one };
191 static const _out_ch_desc sint8_zero = { GL_R8I, data_sint8_zero };
192 static const _out_ch_desc sint8_one = { GL_R8I, data_sint8_one };
193 static const _out_ch_desc sint16_zero = { GL_R16I, data_sint16_zero };
194 static const _out_ch_desc sint16_one = { GL_R16I, data_sint16_one };
195 static const _out_ch_desc sint32_zero = { GL_R32I, data_sint32_zero };
196 static const _out_ch_desc sint32_one = { GL_R32I, data_sint32_one };
197 static const _out_ch_desc snorm8_zero = { GL_R8_SNORM, data_snorm8_zero };
198 static const _out_ch_desc snorm8_one = { GL_R8_SNORM, data_snorm8_one };
199 static const _out_ch_desc snorm16_zero = { GL_R16_SNORM, data_snorm16_zero };
200 static const _out_ch_desc snorm16_one = { GL_R16_SNORM, data_snorm16_one };
201 static const _out_ch_desc uint8_zero = { GL_R8UI, data_uint8_zero };
202 static const _out_ch_desc uint8_one = { GL_R8UI, data_uint8_one };
203 static const _out_ch_desc uint16_zero = { GL_R16UI, data_uint16_zero };
204 static const _out_ch_desc uint16_one = { GL_R16UI, data_uint16_one };
205 static const _out_ch_desc uint32_zero = { GL_R32UI, data_uint32_zero };
206 static const _out_ch_desc uint32_one = { GL_R32UI, data_uint32_one };
207 static const _out_ch_desc unorm8_zero = { GL_R8, data_unorm8_zero };
208 static const _out_ch_desc unorm8_one = { GL_R8, data_unorm8_one };
209 static const _out_ch_desc unorm16_zero = { GL_R16, data_unorm16_zero };
210 static const _out_ch_desc unorm16_one = { GL_R16, data_unorm16_one };
215 const glu::ApiType m_minimum_gl_context;
220 const _sampler& m_sampler;
225 const glw::GLvoid* m_source_data;
226 const _out_ch_desc& m_zero_ch;
227 const _out_ch_desc& m_one_ch;
229 static const _texture_format texture_formats[] = {
1132 static const size_t n_texture_formats = sizeof(texture_formats) / sizeof(texture_formats[0]);
1137 const glw::GLchar* m_name;
1145 static const _texture_access texture_access[] = { { "texture", 0, false, false, false, false, false },
1159 static const size_t n_texture_access = sizeof(texture_access) / sizeof(texture_access[0]);
1167 const glw::GLchar* m_sampler_type;
1176 static const _texture_target texture_targets[] = {
1187 static const size_t n_texture_targets = sizeof(texture_targets) / sizeof(texture_targets[0]);
1190 static const glw::GLint valid_values[] = { GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_ONE, GL_ZERO };
1191 static const size_t n_valid_values = sizeof(valid_values) / sizeof(valid_values[0]);
1194 const _out_ch_desc& get_descriptor_for_channel(const _texture_format& format, const size_t channel);
1209 glw::GLsizei /* length */, const glw::GLchar* message, void* info)
1213 const glw::GLchar* source_str = "Unknown";
1214 const glw::GLchar* type_str = "Unknown";
1215 const glw::GLchar* severity_str = "Unknown";
1306 const _texture_format& format = texture_formats[format_idx];
1363 const glw::GLubyte* ptr = (const glw::GLubyte*)src_data_srgb8_alpha8;
1364 const glw::GLubyte r = ptr[0];
1365 const glw::GLubyte g = ptr[1];
1366 const glw::GLubyte b = ptr[2];
1367 const glw::GLubyte a = ptr[3];
1381 const glw::GLubyte* ptr = (const glw::GLubyte*)format.m_source_data;
1382 const glw::GLubyte r = (glw::GLubyte)((*ptr) >> 5);
1383 const glw::GLubyte g = ((*ptr) >> 2) & 7;
1384 const glw::GLubyte b = (*ptr) & 3;
1396 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1397 const glw::GLubyte r = (glw::GLubyte)((*ptr) >> 11);
1398 const glw::GLubyte g = (glw::GLubyte)((*ptr) >> 5) & 63;
1399 const glw::GLubyte b = (*ptr) & 31;
1411 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1412 const glw::GLubyte r = (glw::GLubyte)((*ptr) >> 12);
1413 const glw::GLubyte g = (glw::GLubyte)(((*ptr) >> 8) & 15);
1414 const glw::GLubyte b = (glw::GLubyte)(((*ptr) >> 4) & 15);
1415 const glw::GLubyte a = (glw::GLubyte)((*ptr) & 15);
1429 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1430 const glw::GLubyte r = (glw::GLubyte)((*ptr) >> 11);
1431 const glw::GLubyte g = ((*ptr) >> 6) & 31;
1432 const glw::GLubyte b = ((*ptr) >> 1) & 31;
1433 const glw::GLubyte a = (*ptr) & 1;
1447 const glw::GLuint* ptr = (const glw::GLuint*)format.m_source_data;
1448 const glw::GLushort r = (glw::GLushort)((*ptr) >> 22);
1449 const glw::GLushort g = ((*ptr) >> 12) & 1023;
1450 const glw::GLushort b = ((*ptr) >> 2) & 1023;
1451 const glw::GLushort a = (*ptr) & 3;
1486 const glw::GLbyte* ptr = (const glw::GLbyte*)format.m_source_data;
1490 const glw::GLbyte val = ptr[i];
1500 const glw::GLubyte* ptr = (const glw::GLubyte*)format.m_source_data;
1504 const glw::GLubyte val = ptr[i];
1514 const glw::GLshort* ptr = (const glw::GLshort*)format.m_source_data;
1518 const glw::GLshort val = ptr[i];
1528 const glw::GLushort* ptr = (const glw::GLushort*)format.m_source_data;
1532 const glw::GLushort val = ptr[i];
1542 const glw::GLint* ptr = (const glw::GLint*)format.m_source_data;
1546 const glw::GLint val = ptr[i];
1556 const glw::GLuint* ptr = (const glw::GLuint*)format.m_source_data;
1560 const glw::GLuint val = ptr[i];
1570 const glw::GLfloat* ptr = (const glw::GLfloat*)format.m_source_data;
1574 const glw::GLfloat val = ptr[i];
1582 const glw::GLhalf* ptr = (const glw::GLhalf*)format.m_source_data;
1586 const glw::GLhalf val = ptr[i];
1645 const _texture_format& output_format = texture_formats[output_format_idx];
1646 const _texture_format& source_format = texture_formats[source_format_idx];
1647 const _out_ch_desc& desc = get_descriptor_for_channel(source_format, index_of_swizzled_channel);
1648 const glw::GLvoid* expected_data = desc.m_expected_data;
1750 const float max_internal = float(calculate_max_for_size(source_size));
1751 const float max_output = float(calculate_max_for_size(output_size));
1752 const float temp_internal = float(ch_rgba[index_of_swizzled_channel]) * max_internal;
1753 const float stor_internal_low =
1755 const float stor_internal_top =
1757 const float read_internal_low = stor_internal_low / max_internal;
1758 const float read_internal_top = stor_internal_top / max_internal;
1759 const float temp_output_low = read_internal_low * max_output;
1760 const float temp_output_top = read_internal_top * max_output;
1853 static const size_t CHANNEL_INDEX_ONE = 4;
1854 static const size_t CHANNEL_INDEX_ZERO = 5;
1863 size_t get_swizzled_channel_idx(const size_t channel_idx, const glw::GLint swizzle_set[4])
1865 const glw::GLint swizzle = swizzle_set[channel_idx];
1903 const _out_ch_desc& get_descriptor_for_channel(const _texture_format& format, const size_t channel)
1905 const _out_ch_desc* desc = 0;
1953 glw::GLenum get_internal_format_for_channel(const _texture_format& format, const size_t channel)
1974 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2005 void Utils::programInfo::build(const glw::GLchar* fragment_shader_code, const glw::GLchar* vertex_shader_code)
2008 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2040 void Utils::programInfo::compile(glw::GLuint shader_id, const glw::GLchar* shader_code) const
2043 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2089 void Utils::programInfo::link() const
2092 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2149 void Utils::replaceToken(const glw::GLchar* token, size_t& search_position, const glw::GLchar* text,
2152 const size_t text_length = strlen(text);
2153 const size_t token_length = strlen(token);
2154 const size_t token_position = string.find(token, search_position);
2176 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2189 static const glw::GLint invalid_values[] = { 0x1902, 0x1907, -1, 2 };
2190 static const size_t n_invalid_values = sizeof(invalid_values) / sizeof(invalid_values[0]);
2193 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2211 const glw::GLenum state = states[i];
2212 const glw::GLint value = valid_values[j];
2220 const glw::GLenum state = states[i];
2221 const glw::GLint value = invalid_values[j];
2237 const glw::GLint value = valid_values[j];
2249 const glw::GLint value = invalid_values[j];
2271 void APIErrorsTest::verifyError(const glw::GLenum expected_error)
2274 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2276 const glw::GLenum error = gl.getError();
2299 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2313 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2320 const glw::GLenum target = texture_targets[tex_tgt_idx].m_target;
2341 void IntialStateTest::verifyValues(const glw::GLenum texture_target)
2344 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2399 const glw::GLsizei SmokeTest::m_depth = 1;
2400 const glw::GLsizei SmokeTest::m_height = 1;
2401 const glw::GLsizei SmokeTest::m_width = 1;
2402 const glw::GLsizei SmokeTest::m_output_height = 8;
2403 const glw::GLsizei SmokeTest::m_output_width = 8;
2425 SmokeTest::SmokeTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description)
2444 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2452 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2460 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2473 static const glw::GLenum tested_format = GL_RGBA32UI;
2474 static const glw::GLenum tested_target = GL_TEXTURE_2D_ARRAY;
2476 const size_t format_idx = get_index_of_format(tested_format);
2477 const size_t tgt_idx = get_index_of_target(tested_target);
2515 const testCase test_case = { channel_idx,
2548 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2562 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2576 void SmokeTest::captureAndVerify(const testCase& test_case, size_t output_format_index, glw::GLint output_channel_size,
2579 const _texture_format& output_format = texture_formats[output_format_index];
2582 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2608 void SmokeTest::draw(glw::GLenum target, const glw::GLint* texture_swizzle, bool use_rgba_enum)
2610 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2658 void SmokeTest::executeTestCase(const testCase& test_case)
2660 const _texture_format& source_format = texture_formats[test_case.m_source_texture_format_index];
2661 const glw::GLint red = test_case.m_texture_swizzle_red;
2662 const glw::GLint green = test_case.m_texture_swizzle_green;
2663 const glw::GLint blue = test_case.m_texture_swizzle_blue;
2664 const glw::GLint alpha = test_case.m_texture_swizzle_alpha;
2665 const glw::GLint param[4] = { red, green, blue, alpha };
2666 const size_t channel = get_swizzled_channel_idx(test_case.m_channel_index, param);
2668 const glw::GLenum out_internal_format = get_internal_format_for_channel(source_format, channel);
2669 const size_t out_format_idx = get_index_of_format(out_internal_format);
2672 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2715 static const glw::GLuint rgba32ui[4] = { 0x3fffffff, 0x7fffffff, 0xbfffffff, 0xffffffff };
2717 const glw::GLenum target = texture_targets[target_idx].m_target;
2718 const _texture_format& texture_format = texture_formats[format_idx];
2721 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2722 const glw::GLvoid* data = 0;
2732 data = (const glw::GLubyte*)rgba32ui;
2767 std::string SmokeTest::getFragmentShader(const testCase& test_case, size_t output_format_index, bool is_tested_stage)
2769 static const glw::GLchar* fs_blank_template = "#version 330 core\n"
2781 static const glw::GLchar* fs_test_template = "#version 330 core\n"
2796 const std::string& arguments = prepareArguments(test_case);
2797 const _texture_access& access = texture_access[test_case.m_texture_access_index];
2798 const glw::GLchar* channel = channels[test_case.m_channel_index];
2799 const _texture_format& output_format = texture_formats[output_format_index];
2800 const _texture_format& source_format = texture_formats[test_case.m_source_texture_format_index];
2801 const _texture_target& target = texture_targets[test_case.m_source_texture_target_index];
2836 std::string SmokeTest::getVertexShader(const testCase& test_case, bool is_tested_stage)
2838 static const glw::GLchar* vs_blank_template = "#version 330 core\n"
2852 static const glw::GLchar* vs_test_template = "#version 330 core\n"
2877 const std::string& arguments = prepareArguments(test_case);
2878 const _texture_access& access = texture_access[test_case.m_texture_access_index];
2879 const glw::GLchar* channel = channels[test_case.m_channel_index];
2880 const _texture_format& source_format = texture_formats[test_case.m_source_texture_format_index];
2881 const _texture_target& target = texture_targets[test_case.m_source_texture_target_index];
2910 const _texture_target& target = texture_targets[target_idx];
2937 const _texture_access& access = texture_access[access_idx];
2938 const _texture_target& source_target = texture_targets[target_idx];
2992 const _texture_format& format = texture_formats[format_idx];
2993 const _texture_target& source_target = texture_targets[target_idx];
3040 void SmokeTest::logTestCaseDetials(const testCase& test_case)
3042 const glw::GLenum target = texture_targets[test_case.m_source_texture_target_index].m_target;
3043 const _texture_format& source_format = texture_formats[test_case.m_source_texture_format_index];
3044 const glw::GLint red = test_case.m_texture_swizzle_red;
3045 const glw::GLint green = test_case.m_texture_swizzle_green;
3046 const glw::GLint blue = test_case.m_texture_swizzle_blue;
3047 const glw::GLint alpha = test_case.m_texture_swizzle_alpha;
3048 const glw::GLint param[4] = { red, green, blue, alpha };
3049 const size_t channel = get_swizzled_channel_idx(test_case.m_channel_index, param);
3050 const glw::GLenum out_internal_format = get_internal_format_for_channel(source_format, channel);
3051 const size_t out_format_idx = get_index_of_format(out_internal_format);
3052 const _texture_format& output_format = texture_formats[out_format_idx];
3079 void SmokeTest::prepareAndTestProgram(const testCase& test_case, size_t output_format_index,
3083 const _texture_target& source_target = texture_targets[test_case.m_source_texture_target_index];
3084 const glw::GLint red = test_case.m_texture_swizzle_red;
3085 const glw::GLint green = test_case.m_texture_swizzle_green;
3086 const glw::GLint blue = test_case.m_texture_swizzle_blue;
3087 const glw::GLint alpha = test_case.m_texture_swizzle_alpha;
3088 const glw::GLint param[4] = { red, green, blue, alpha };
3091 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
3094 const std::string& fs = getFragmentShader(test_case, output_format_index, !test_vertex_stage);
3095 const std::string& vs = getVertexShader(test_case, test_vertex_stage);
3128 std::string SmokeTest::prepareArguments(const testCase& test_case)
3130 const _texture_access& access = texture_access[test_case.m_texture_access_index];
3131 const _texture_target& target = texture_targets[test_case.m_source_texture_target_index];
3134 const std::string& coordinates = prepareCoordinates(test_case);
3146 const std::string& derivatives_0 = prepareDerivatives(test_case, 0);
3147 const std::string& derivatives_1 = prepareDerivatives(test_case, 1);
3148 const size_t start_pos = position;
3162 const std::string& offsets = prepareOffsets(test_case);
3163 const size_t start_pos = position;
3176 const std::string& sample = prepareSample();
3177 const size_t start_pos = position;
3197 std::string SmokeTest::prepareCoordinates(const testCase& test_case)
3199 const _texture_access& access = texture_access[test_case.m_texture_access_index];
3200 const _texture_target& target = texture_targets[test_case.m_source_texture_target_index];
3202 const glw::GLchar* type = 0;
3289 std::string SmokeTest::prepareDerivatives(const testCase& test_case, size_t index)
3291 const _texture_target& target = texture_targets[test_case.m_source_texture_target_index];
3293 const glw::GLchar* type = 0;
3346 std::string SmokeTest::prepareOffsets(const testCase& test_case)
3348 const _texture_target& target = texture_targets[test_case.m_source_texture_target_index];
3350 const glw::GLchar* type = DE_NULL;
3396 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
3398 const _texture_format& format = texture_formats[format_idx];
3424 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
3442 static const glw::GLint border = 0;
3443 static const glw::GLint level = 0;
3446 const glw::GLenum target = texture_targets[target_idx].m_target;
3447 const _texture_format& texture_format = texture_formats[format_idx];
3451 const glw::GLenum format = texture_format.m_format;
3452 const glw::GLchar* function_name = "unknown";
3453 const glw::GLenum internal_format = texture_format.m_internal_format;
3456 const glw::GLenum type = texture_format.m_type;
3459 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
3608 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
3666 void SmokeTest::verifyOutputImage(const testCase& test_case, size_t /* output_format_index */,
3668 const glw::GLubyte* data)
3670 static const glw::GLuint rgba32ui[6] = { 0x3fffffff, 0x7fffffff, 0xbfffffff, 0xffffffff, 1, 0 };
3672 const _texture_format& source_format = texture_formats[test_case.m_source_texture_format_index];
3680 const glw::GLuint* image = (glw::GLuint*)data;
3717 static const glw::GLenum tested_formats[] = { GL_R8, GL_R3_G3_B2, GL_RGBA16, GL_R11F_G11F_B10F,
3719 static const size_t n_tested_formats = sizeof(tested_formats) / sizeof(tested_formats[0]);
3725 static const glw::GLenum tested_targets[] = { GL_TEXTURE_1D, GL_TEXTURE_2D_MULTISAMPLE_ARRAY };
3726 static const size_t n_tested_targets = sizeof(tested_targets) / sizeof(tested_targets[0]);
3732 static const size_t access_idx = 4; /* 4 - index of "texelFetch" entry in texture_access_routines */
3738 static const size_t tested_swizzle_combinations[][4] = { { 3, 2, 1,
3744 static const size_t n_tested_swizzle_combinations =
3774 const size_t format_idx = get_index_of_format(tested_formats[tested_format_idx]);
3787 const size_t tgt_idx = get_index_of_target(tested_targets[tested_tgt_idx]);
3848 const size_t r = tested_swizzle_combinations[tested_swizzle_idx][0];
3849 const size_t g = tested_swizzle_combinations[tested_swizzle_idx][1];
3850 const size_t b = tested_swizzle_combinations[tested_swizzle_idx][2];
3851 const size_t a = tested_swizzle_combinations[tested_swizzle_idx][3];
3857 const testCase test_case = { channel_idx,
3935 const glw::GLenum target = texture_targets[target_idx].m_target;
3938 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
3966 const glw::GLenum status = gl.checkFramebufferStatus(GL_FRAMEBUFFER);
4017 const glw::GLenum target = texture_targets[target_idx].m_target;
4018 const _texture_format& format = texture_formats[format_idx];
4021 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
4092 static const glw::GLchar* fs_template = "#version 330 core\n"
4102 const _texture_format& format = texture_formats[format_idx];
4103 const std::string& values = prepareValues(format_idx);
4104 const std::string& vs = getVertexShader(testCase(), false); /* Get blank VS */
4146 bool isInRange(const void* value, const void* low, const void* top)
4148 const T* v_ptr = (const T*)value;
4149 const T* l_ptr = (const T*)low;
4150 const T* t_ptr = (const T*)top;
4168 void FunctionalTest::verifyOutputImage(const testCase& test_case, size_t output_format_index,
4170 const glw::GLubyte* data)
4172 const _texture_format& output_format = texture_formats[output_format_index];
4184 const size_t offset = i * texel_size;
4185 const glw::GLvoid* pointer = data + offset;