Lines Matching defs:program

55  * @param program          Program object
61 bool Utils::checkUniformBinding(Utils::program& program, const glw::GLchar* name, glw::GLint expected_binding)
63 const GLint uniform_location = program.getUniformLocation(name);
69 GLint binding = program.getUniform1i(uniform_location);
75 * @param program Program object
82 bool Utils::checkUniformArrayBinding(Utils::program& program, const glw::GLchar* name, glw::GLuint index,
88 const GLint uniform_location = program.getUniformLocation(buffer);
94 GLint binding = program.getUniform1i(uniform_location);
1526 void TestBase::prepareUniforms(Utils::program& /* program */)
1760 Utils::program program(m_context);
1772 /* Build program */
1775 program.build(compute_shader, 0 /* fragment shader */, 0 /* geometry shader */,
1786 Utils::program::printShaderSource(exc.m_shader_source, message);
1801 /* Set current program */
1802 program.use();
1805 return checkResults(program);
1817 Utils::program program(m_context);
1832 /* Build program */
1835 program.build(0 /* compute shader */, fragment_data, geometry_data, tess_ctrl_data, tess_eval_data, vertex_data,
1845 Utils::program::printShaderSource(exc.m_shader_source, message);
1860 /* Set current program */
1861 program.use();
1864 return checkResults(program);
1905 void GLSLTestBase::prepareVertexBuffer(const Utils::program&, Utils::buffer&, Utils::vertexArray& vao)
1931 * @param program Program object
1935 void GLSLTestBase::bindTextureToimage(Utils::program& program, Utils::texture& texture,
1945 GLint location = program.getUniformLocation(uniform_name);
1952 * @param program Program object
1956 void GLSLTestBase::bindTextureToSampler(Utils::program& program, Utils::texture& texture,
1967 GLint location = program.getUniformLocation(uniform_name);
2025 void GLSLTestBase::prepareImage(Utils::program& program, Utils::texture& color_texture) const
2029 bindTextureToimage(program, color_texture, "uni_image");
2043 Utils::program program(m_context);
2056 /* Build program */
2059 program.build(compute_shader, 0 /* fragment shader */, 0 /* geometry shader */,
2070 Utils::program::printShaderSource(exc.m_shader_source, message);
2090 Utils::program::printShaderSource(compute_shader, message);
2096 /* Set current program */
2097 program.use();
2100 prepareImage(program, color_tex);
2106 bindTextureToSampler(program, source_tex, sampler_name);
2110 prepareUniforms(program);
2142 Utils::program program(m_context);
2160 /* Build program */
2163 program.build(0 /* compute shader */, fragment_data, geometry_data, tess_ctrl_data, tess_eval_data, vertex_data,
2173 Utils::program::printShaderSource(exc.m_shader_source, message);
2198 Utils::program::printShaderSource(*data[i], message);
2206 prepareVertexBuffer(program, vertex_buffer, vao);
2208 /* Set current program */
2209 program.use();
2218 bindTextureToSampler(program, source_tex, sampler_name);
2222 prepareUniforms(program);
2260 Utils::program program(m_context);
2266 /* Build program */
2269 program.build(conmpute_data /* compute shader */, 0 /* fragment shader */, 0 /* geometry shader */,
2303 Utils::program program(m_context);
2318 /* Build program */
2321 program.build(0 /* compute shader */, fragment_data, geometry_data, tess_ctrl_data, tess_eval_data, vertex_data,
2974 * @param program Program object
2978 void LineContinuationTest::prepareVertexBuffer(const Utils::program& program, Utils::buffer& buffer,
2982 GLint tex_coord_loc = program.getAttribLocation(tex_coord_name.c_str());
4554 * @param program Current program
4556 void ImplicitConversionsValidTest::prepareUniforms(Utils::program& program)
4570 program.uniform("uni_left", Utils::DOUBLE, test_case.m_n_cols, test_case.m_n_rows, double_data);
4571 program.uniform("uni_right", Utils::DOUBLE, test_case.m_n_cols, test_case.m_n_rows, double_data);
4574 program.uniform("uni_left", Utils::FLOAT, test_case.m_n_cols, test_case.m_n_rows, float_data);
4575 program.uniform("uni_right", Utils::FLOAT, test_case.m_n_cols, test_case.m_n_rows, float_data);
4578 program.uniform("uni_left", Utils::INT, test_case.m_n_cols, test_case.m_n_rows, int_data);
4579 program.uniform("uni_right", Utils::INT, test_case.m_n_cols, test_case.m_n_rows, int_data);
4582 program.uniform("uni_left", Utils::UINT, test_case.m_n_cols, test_case.m_n_rows, uint_data);
4583 program.uniform("uni_right", Utils::UINT, test_case.m_n_cols, test_case.m_n_rows, uint_data);
5259 * @param program Current program
5261 void ConstDynamicValueTest::prepareUniforms(Utils::program& program)
5266 program.uniform("uni_scalar", Utils::FLOAT, 1, 1, &scalar);
5267 program.uniform("uni_vector", Utils::FLOAT, 1, 4, float_data);
5268 program.uniform("uni_matrix", Utils::FLOAT, 2, 2, float_data);
5995 * @param program Program instance
6001 void QualifierOrderTest::prepareVertexBuffer(const Utils::program& program, Utils::buffer& buffer,
6005 GLint test_loc = program.getAttribLocation(test_name.c_str());
6396 * @param program Program instance
6402 void QualifierOrderBlockTest::prepareVertexBuffer(const Utils::program& program, Utils::buffer& buffer,
6406 GLint test_loc = program.getAttribLocation(test_name.c_str());
6732 * @param program Current program
6734 void QualifierOrderUniformTest::prepareUniforms(Utils::program& program)
6738 program.uniform("uni_fs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
6739 program.uniform("uni_gs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
6740 program.uniform("uni_tcs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
6741 program.uniform("uni_tes_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
6742 program.uniform("uni_vs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7048 * @param program Current program
7050 void QualifierOrderFunctionInoutTest::prepareUniforms(Utils::program& program)
7054 program.uniform("uni_fs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7055 program.uniform("uni_gs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7056 program.uniform("uni_tcs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7057 program.uniform("uni_tes_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7058 program.uniform("uni_vs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7363 * @param program Current program
7365 void QualifierOrderFunctionInputTest::prepareUniforms(Utils::program& program)
7369 program.uniform("uni_fs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7370 program.uniform("uni_gs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7371 program.uniform("uni_tcs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7372 program.uniform("uni_tes_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7373 program.uniform("uni_vs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7687 * @param program Current program
7689 void QualifierOrderFunctionOutputTest::prepareUniforms(Utils::program& program)
7693 program.uniform("uni_fs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7694 program.uniform("uni_gs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7695 program.uniform("uni_tcs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7696 program.uniform("uni_tes_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7697 program.uniform("uni_vs_test", Utils::FLOAT, 1 /* n_cols */, 4 /* n_rows */, float_data);
7918 * @param program Program instance
7924 void QualifierOverrideLayoutTest::prepareVertexBuffer(const Utils::program& program, Utils::buffer& buffer,
7930 GLint test_loc = program.getAttribLocation(test_name.c_str());
8204 * @param program Current program
8206 void BindingUniformBlocksTest::prepareUniforms(Utils::program& program)
8208 (void)program;
8503 * @param program Current program
8505 void BindingUniformSingleBlockTest::prepareUniforms(Utils::program& program)
8507 (void)program;
8781 * @param program Current program
8783 void BindingUniformBlockArrayTest::prepareUniforms(Utils::program& program)
8802 checkBinding(program, i, i + 2);
8829 * @param program Program
8833 void BindingUniformBlockArrayTest::checkBinding(Utils::program& program, glw::GLuint index, glw::GLint expected_binding)
8840 const GLuint uniform_index = gl.getUniformBlockIndex(program.m_program_object_id, buffer);
8849 gl.getActiveUniformBlockiv(program.m_program_object_id, uniform_index, GL_UNIFORM_BLOCK_BINDING, &binding);
8872 bool BindingUniformDefaultTest::checkResults(Utils::program& program)
8876 const GLuint index = gl.getUniformBlockIndex(program.m_program_object_id, "GOKU");
8886 gl.getActiveUniformBlockiv(program.m_program_object_id, index, GL_UNIFORM_BLOCK_BINDING, &binding);
9316 * @param program Current program
9318 void BindingUniformAPIOverirdeTest::prepareUniforms(Utils::program& program)
9326 const GLuint index = gl.getUniformBlockIndex(program.m_program_object_id, "GOKU");
9334 gl.uniformBlockBinding(program.m_program_object_id, index, new_binding);
9339 gl.getActiveUniformBlockiv(program.m_program_object_id, index, GL_UNIFORM_BLOCK_BINDING, &binding);
10161 * @param program Current program
10163 void BindingSamplersTest::prepareUniforms(Utils::program& program)
10165 (void)program;
10499 * @param program Current program
10501 void BindingSamplerSingleTest::prepareUniforms(Utils::program& program)
10503 (void)program;
10766 * @param program Current program
10768 void BindingSamplerArrayTest::prepareUniforms(Utils::program& program)
10790 checkBinding(program, i, expected_binding);
10825 * @param program Program
10829 void BindingSamplerArrayTest::checkBinding(Utils::program& program, GLuint index, GLint expected_binding)
10831 if (false == Utils::checkUniformArrayBinding(program, "goku", index, expected_binding))
10851 bool BindingSamplerDefaultTest::checkResults(Utils::program& program)
10853 return Utils::checkUniformBinding(program, "goku", 0 /* expected_binding */);
11269 * @param program Current program
11271 void BindingSamplerAPIOverrideTest::prepareUniforms(Utils::program& program)
11278 const GLint uniform_location = program.getUniformLocation("goku");
11288 gl.getUniformiv(program.m_program_object_id, uniform_location, &binding);
11954 * @param program Current program
11956 void BindingImagesTest::prepareUniforms(Utils::program& program)
11958 (void)program;
12293 * @param program Current program
12295 void BindingImageSingleTest::prepareUniforms(Utils::program& program)
12297 (void)program;
12577 * @param program Current program
12579 void BindingImageArrayTest::prepareUniforms(Utils::program& program)
12594 checkBinding(program, i, expected_binding);
12619 * @param program Program
12623 void BindingImageArrayTest::checkBinding(Utils::program& program, GLuint index, GLint expected_binding)
12625 if (false == Utils::checkUniformArrayBinding(program, "goku", index, expected_binding))
12645 bool BindingImageDefaultTest::checkResults(Utils::program& program)
12647 return Utils::checkUniformBinding(program, "goku", 0 /* expected_binding */);
13115 * @param program Current program
13117 void BindingImageAPIOverrideTest::prepareUniforms(Utils::program& program)
13124 const GLint uniform_location = program.getUniformLocation("goku");
13134 gl.getUniformiv(program.m_program_object_id, uniform_location, &binding);
13470 * @param program Current program
13472 void InitializerListTest::prepareUniforms(Utils::program& program)
13477 program.uniform("uni_matrix", Utils::FLOAT, 4, 4, float_data);
15373 * @param program Current program
15375 void LengthOfVectorAndMatrixTest::prepareUniforms(Utils::program& program)
15400 program.uniform("uni_variable", Utils::FLOAT, test_case.m_n_cols, test_case.m_n_rows, float_data);
15403 program.uniform("uni_variable", Utils::INT, 1 /* columns */, test_case.m_n_rows, int_data);
15406 program.uniform("uni_variable", Utils::UINT, 1 /* columns */, test_case.m_n_rows, uint_data);
15415 * @param program Program object
15421 void LengthOfVectorAndMatrixTest::prepareVertexBuffer(const Utils::program& program, Utils::buffer& buffer,
15440 GLint variable_loc = program.getAttribLocation(variable_name.c_str());
16483 * @param program Current program
16485 void LengthOfComputeResultTest::prepareUniforms(Utils::program& program)
16504 program.uniform("gohan", Utils::FLOAT, 4 /* n_cols */, 3 /* n_rows */, gohan_data);
16505 program.uniform("goten", Utils::FLOAT, 2 /* n_cols */, 4 /* n_rows */, goten_data);
16506 program.uniform("vegeta", Utils::FLOAT, 1 /* n_cols */, 3 /* n_rows */, vegeta_data);
16507 program.uniform("trunks", Utils::FLOAT, 1 /* n_cols */, 3 /* n_rows */, trunks_data);
16508 program.uniform("indices", Utils::UINT, 1 /* n_cols */, 4 /* n_rows */, indices_data);
16509 program.uniform("variable", Utils::UINT, 1 /* n_cols */, 1 /* n_rows */, variable_data);
16510 program.uniform("expected_lengths", Utils::UINT, 1 /* n_cols */, 4 /* n_rows */, expected_lengths_data);
16511 program.uniform("expected_sum", Utils::FLOAT, 1 /* n_cols */, 1 /* n_rows */, expected_sum_data);
16831 * @param program Current program
16833 void ScalarSwizzlersTest::prepareUniforms(Utils::program& program)
16838 program.uniform("variable", Utils::FLOAT, 1 /* n_cols */, 1 /* n_rows */, variable_data);
16839 program.uniform("expected_values", Utils::FLOAT, 1 /* n_cols */, 3 /* n_rows */, expected_values_data);
17355 * @param program Current program
17357 void BuiltInValuesTest::prepareUniforms(Utils::program& program)
17361 program.uniform("expected_values", Utils::INT, 1 /* n_cols */, 2 /* n_rows */, expected_values_data);
17902 const glw::GLenum Utils::program::ARB_COMPUTE_SHADER = 0x91B9;
17908 Utils::program::program(deqp::Context& context)
17924 Utils::program::~program()
17929 /** Build program
17939 * @param is_separable Selects if monolithis or separable program should be built. Defaults to false
17941 void Utils::program::build(const glw::GLchar* compute_shader_code, const glw::GLchar* fragment_shader_code,
17957 /** Build program
17967 * @param is_separable Selects if monolithis or separable program should be built. Defaults to false
17969 void Utils::program::build(const shaderSource& compute_shader, const shaderSource& fragment_shader,
18026 /* Create program object */
18044 /* Link program */
18048 void Utils::program::compile(glw::GLuint shader_id, const Utils::shaderSource& source) const
18115 /** Create program from provided binary
18117 * @param binary Buffer with binary form of program
18120 void Utils::program::createFromBinary(const std::vector<GLubyte>& binary, GLenum binary_format)
18125 /* Create program object */
18133 glw::GLint Utils::program::getAttribLocation(const glw::GLchar* name) const
18144 /** Get binary form of program
18149 void Utils::program::getBinary(std::vector<GLubyte>& binary, GLenum& binary_format) const
18173 GLuint Utils::program::getSubroutineIndex(const glw::GLchar* subroutine_name, glw::GLenum shader_stage) const
18198 GLint Utils::program::getSubroutineUniformLocation(const glw::GLchar* uniform_name, glw::GLenum shader_stage) const
18223 GLint Utils::program::getUniform1i(GLuint location) const
18241 GLint Utils::program::getUniformLocation(const glw::GLchar* uniform_name) const
18260 /** Attach shaders and link program
18263 void Utils::program::link() const
18336 /** Delete program object and all attached shaders
18339 void Utils::program::remove()
18344 /* Make sure program object is no longer used by GL */
18347 /* Clean program object */
18392 void Utils::program::uniform(const glw::GLchar* uniform_name, TYPES type, glw::GLuint n_columns, glw::GLuint n_rows,
18446 void Utils::program::use() const
18454 void Utils::program::printShaderSource(const shaderSource& source, tcu::MessageBuilder& log)