void piglit_init(int argc, char **argv) { int samples; /* At present fragment shader supports only fixed number of * attachments (3) */ int num_attachments = 3; if (argc < 2) print_usage_and_exit(argv[0]); { char *endptr = NULL; samples = strtol(argv[1], &endptr, 0); if (endptr != argv[1] + strlen(argv[1])) print_usage_and_exit(argv[0]); } piglit_require_gl_version(21); piglit_require_extension("GL_ARB_framebuffer_object"); piglit_require_extension("GL_ARB_vertex_array_object"); int pattern_width = piglit_width / 2; int pattern_height = piglit_height / num_attachments; piglit_ortho_projection(pattern_width, pattern_height, GL_TRUE); /* Skip the test if samples > GL_MAX_SAMPLES */ GLint max_samples; glGetIntegerv(GL_MAX_SAMPLES, &max_samples); if (samples > max_samples) piglit_report_result(PIGLIT_SKIP); ms_fbo_and_draw_buffers_setup(samples, pattern_width, pattern_height, num_attachments, GL_COLOR_BUFFER_BIT, GL_RGBA); shader_compile(true /* sample_alpha_to_coverage */, false /* dual_src_blend */); }
void piglit_init(int argc, char **argv) { int samples; const int num_attachments = 1; if (argc < 2) print_usage_and_exit(argv[0]); { char *endptr = NULL; samples = strtol(argv[1], &endptr, 0); if (endptr != argv[1] + strlen(argv[1])) print_usage_and_exit(argv[0]); } piglit_require_gl_version(30); int pattern_width = piglit_width / 2; int pattern_height = piglit_height / num_attachments; piglit_ortho_projection(pattern_width, pattern_height, GL_TRUE); /* Skip the test if samples > GL_MAX_SAMPLES */ GLint max_samples; glGetIntegerv(GL_MAX_SAMPLES, &max_samples); if (samples > max_samples) piglit_report_result(PIGLIT_SKIP); ms_fbo_and_draw_buffers_setup(samples, pattern_width, pattern_height, num_attachments, GL_COLOR_BUFFER_BIT, GL_RGBA); shader_compile(true /* sample_alpha_to_coverage */, true /* dual_src_blend */, true /* frag_out_zero_write */); }
void piglit_init(int argc, char **argv) { if (argc < 2) print_usage_and_exit(argv[0]); { char *endptr = NULL; samples = strtol(argv[1], &endptr, 0); if (endptr != argv[1] + strlen(argv[1])) print_usage_and_exit(argv[0]); } piglit_require_gl_version(30); int pattern_width = piglit_width / 2; int pattern_height = piglit_height / num_attachments; piglit_ortho_projection(pattern_width, pattern_height, GL_TRUE); /* Skip the test if samples > GL_MAX_SAMPLES */ GLint max_samples; glGetIntegerv(GL_MAX_SAMPLES, &max_samples); if (samples > max_samples) piglit_report_result(PIGLIT_SKIP); /* Testing of integer formats other than GL_RGBA8I is not supported * by utility functions in draw-buffers-common.cpp. */ ms_fbo_and_draw_buffers_setup(samples, pattern_width, pattern_height, num_attachments, GL_COLOR_BUFFER_BIT, GL_RGBA8I); shader_compile(false /* sample_alpha_to_coverage */, false /* dual_src_blend */); }
PIGLIT_GL_TEST_CONFIG_END void piglit_init(int argc, char **argv) { const int num_attachments = 1; /* For single sample buffer */ const int samples = 0; piglit_require_gl_version(21); piglit_require_extension("GL_ARB_framebuffer_object"); piglit_require_extension("GL_ARB_vertex_array_object"); int pattern_width = piglit_width / 2; int pattern_height = piglit_height / num_attachments; piglit_ortho_projection(pattern_width, pattern_height, GL_TRUE); /* Skip the test if samples > GL_MAX_SAMPLES */ GLint max_samples; glGetIntegerv(GL_MAX_SAMPLES, &max_samples); if (samples > max_samples) piglit_report_result(PIGLIT_SKIP); ms_fbo_and_draw_buffers_setup(samples, pattern_width, pattern_height, num_attachments, GL_COLOR_BUFFER_BIT, GL_RGBA); shader_compile(false /* sample_alpha_to_coverage */, false /* dual_src_blend */); }