enum piglit_result piglit_display(void) { bool pass = true; int i; if (!piglit_khr_no_error) test_error_cases(&pass); /* run all the getprogramresourceiv tests */ for (i = 0; i < sizeof(subtests) / sizeof(struct subtest_t); i++) { run_subtest(subtests[i], &pass); } glDeleteProgramSafe(prog_atom); glDeleteProgramSafe(prog_loc); glDeleteProgramSafe(prog_cs); glDeleteProgramSafe(prog_sub_tess); glDeleteProgramSafe(prog_sub); glDeleteProgramSafe(prog_stor); glDeleteProgramSafe(prog_buff_blks); glDeleteProgramSafe(prog_std); return pass ? PIGLIT_PASS : PIGLIT_FAIL; }
void piglit_init(int argc, char **argv) { bool test1; bool test2; test1 = run_subtest(gs_tmpl, varyings, ARRAY_SIZE(varyings)); piglit_report_subtest_result(test1 ? PIGLIT_PASS : PIGLIT_FAIL, "arb_gpu_shader5-xfb-streams"); test2 = run_subtest(gs_tmpl_blocks, varyings_blocks, ARRAY_SIZE(varyings_blocks)); piglit_report_subtest_result(test2 ? PIGLIT_PASS : PIGLIT_FAIL, "arb_gpu_shader5-xfb-streams-blocks"); piglit_report_result(test1 && test2 ? PIGLIT_PASS : PIGLIT_FAIL); }
enum piglit_result piglit_display(void) { bool pass = true; int i; /* run all the getprograminterfaceiv tests */ for (i = 0; i < sizeof(subtests) / sizeof(struct subtest_t); i++) { run_subtest(subtests[i], &pass); } return pass ? PIGLIT_PASS : PIGLIT_FAIL; }
enum piglit_result piglit_display(void) { static const GLenum result_types[] = { GL_INT, GL_UNSIGNED_INT, GL_UNSIGNED_INT64_ARB }; enum piglit_result r = PIGLIT_PASS; for (unsigned qnum = 0; qnum < num_query_types(); qnum++) { query_desc = &query_types[qnum]; bool supported = is_query_supported(query_desc); for (sync_mode = QBO_SYNC; sync_mode < NUM_QBO_SYNC_MODES; sync_mode++) { for (unsigned ridx = 0; ridx < ARRAY_SIZE(result_types); ++ridx) { enum piglit_result subtest_result = PIGLIT_SKIP; result_type = result_types[ridx]; if (supported) { subtest_result = run_subtest(); if (subtest_result != PIGLIT_PASS) r = subtest_result; } piglit_report_subtest_result(subtest_result, "query-%s-%s-%s", piglit_get_gl_enum_name(query_desc->type), sync_mode_names[sync_mode], piglit_get_gl_enum_name(result_type)); } } } return r; }
enum piglit_result piglit_display(void) { GLint max_components; int max_varyings; int max_xfb_varyings = 0; GLint max_xfb_components; GLboolean pass; enum piglit_result status = PIGLIT_PASS; GLuint vs, fs; piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); glGetIntegerv(GL_MAX_VARYING_FLOATS, &max_components); max_varyings = max_components / 4; init_xfb_varyings(max_varyings); printf("GL_MAX_VARYING_FLOATS = %i\n", max_components); if (max_varyings > MAX_VARYING) { printf("test not designed to handle >%d varying vec4s.\n" "(implementation reports %d components)\n", max_components, MAX_VARYING); max_varyings = MAX_VARYING; status = PIGLIT_WARN; } glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, &max_xfb_components); max_xfb_varyings = MIN2(max_xfb_components / 4, max_varyings); printf("GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = %i\n", max_xfb_components); /* Test single dimension array */ vs = get_vs(max_varyings); fs = get_fs(max_varyings); pass = run_subtest(vs, fs, max_xfb_varyings, max_varyings, xfb_varying_array); if (!pass) { status = PIGLIT_FAIL; } piglit_report_subtest_result(status, "max-varying-single-dimension-array"); /* Test arrays of arrays */ if (piglit_is_extension_supported("GL_ARB_arrays_of_arrays")) { bool subtest_result; vs = get_vs_aoa(max_varyings); fs = get_fs_aoa(max_varyings); subtest_result = run_subtest(vs, fs, max_xfb_varyings, max_varyings, xfb_varying_aoa); if (!subtest_result) { status = PIGLIT_FAIL; pass = false; } piglit_report_subtest_result(status, "max-varying-arrays-of-arrays"); } piglit_present_results(); return status; }