Beispiel #1
0
void
piglit_init(int argc, char **argv)
{
	int vuniforms = 0, vblocks = 0;
	int guniforms = 0, gblocks = 0;
	int funiforms = 0, fblocks = 0;
	int blocksize = 0;
	bool gs = piglit_is_extension_supported("GL_ARB_geometry_shader4");

	piglit_require_extension("GL_ARB_uniform_buffer_object");

	piglit_print_minmax_header();

	piglit_test_min_int(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 1024);

	piglit_test_min_int(GL_MAX_VERTEX_UNIFORM_BLOCKS, 12);
	piglit_test_min_int(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, 12);
	if (gs)
		piglit_test_min_int(GL_MAX_GEOMETRY_UNIFORM_BLOCKS, 12);

	piglit_test_min_int(GL_MAX_COMBINED_UNIFORM_BLOCKS, gs ? 36 : 24);
	piglit_test_min_int(GL_MAX_UNIFORM_BUFFER_BINDINGS, gs ? 36 : 24);
	piglit_test_min_int(GL_MAX_UNIFORM_BLOCK_SIZE, 16384);

	/* Minimum value for OpenGL 3.1 is
	 * (MAX_<stage>_UNIFORM_BLOCKS * MAX_UNIFORM_BLOCK_SIZE) +
	 * MAX_<stage>_UNIFORM_COMPONENTS. Minimum value prior to
	 * OpenGL 3.1 is MAX_<stage>_UNIFORM_COMPONENTS.
	 */
	if (piglit_get_gl_version() >= 31) {
		glGetIntegerv(GL_MAX_VERTEX_UNIFORM_BLOCKS, &vblocks);
		glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, &fblocks);
	}
	glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &vuniforms);
	glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &funiforms);
	glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &blocksize);
	piglit_test_min_int(GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS,
			 vblocks * blocksize + vuniforms);
	piglit_test_min_int(GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS,
			 fblocks * blocksize + funiforms);
	if (gs) {
		if (piglit_get_gl_version() >= 31) {
			glGetIntegerv(GL_MAX_GEOMETRY_UNIFORM_BLOCKS, &gblocks);
		}
		glGetIntegerv(GL_MAX_GEOMETRY_UNIFORM_COMPONENTS, &guniforms);

		piglit_test_min_int(GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS,
				    gblocks * blocksize + guniforms);
	}

	piglit_test_min_int(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, 1);

	if (!piglit_check_gl_error(GL_NO_ERROR))
		piglit_report_result(PIGLIT_FAIL);

	piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
Beispiel #2
0
void
piglit_init(int argc, char **argv)
{
	piglit_require_extension("GL_ARB_texture_buffer_object");

	piglit_print_minmax_header();
	piglit_test_min_int(GL_MAX_TEXTURE_BUFFER_SIZE, 65536);

	piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
Beispiel #3
0
void
piglit_init(int argc, char **argv)
{
	piglit_require_extension("GL_ARB_explicit_uniform_location");
	piglit_print_minmax_header();

	piglit_test_min_int(GL_MAX_UNIFORM_LOCATIONS, 1024);

        if (!piglit_check_gl_error(GL_NO_ERROR))
                piglit_report_result(PIGLIT_FAIL);
        piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
Beispiel #4
0
void
piglit_init(int argc, char **argv)
{
	GLint MAX_TESS_CONTROL_UNIFORM_COMPONENTS;
	GLint MAX_TESS_EVALUATION_UNIFORM_COMPONENTS;
	GLint MAX_TESS_CONTROL_UNIFORM_BLOCKS;
	GLint MAX_TESS_EVALUATION_UNIFORM_BLOCKS;
	GLint MAX_UNIFORM_BLOCK_SIZE;

	piglit_require_extension("GL_ARB_tessellation_shader");
	piglit_print_minmax_header();

	piglit_test_min_int(GL_MAX_TESS_GEN_LEVEL, 64);
	piglit_test_min_int(GL_MAX_PATCH_VERTICES, 32);
	piglit_test_min_int(GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS, 1024);
	piglit_test_min_int(GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS, 1024);
	piglit_test_min_int(GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS, 16);
	piglit_test_min_int(GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS, 16);
	piglit_test_min_int(GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS, 128);
	piglit_test_min_int(GL_MAX_TESS_PATCH_COMPONENTS, 120);
	piglit_test_min_int(GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, 4096);
	piglit_test_min_int(GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS, 128);
	piglit_test_min_int(GL_MAX_TESS_CONTROL_INPUT_COMPONENTS, 128);
	piglit_test_min_int(GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS, 128);
	piglit_test_min_int(GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS, 12);
	piglit_test_min_int(GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, 12);

	GETINTV(MAX_TESS_CONTROL_UNIFORM_COMPONENTS);
	GETINTV(MAX_TESS_EVALUATION_UNIFORM_COMPONENTS);
	GETINTV(MAX_TESS_CONTROL_UNIFORM_BLOCKS);
	GETINTV(MAX_TESS_EVALUATION_UNIFORM_BLOCKS);
	GETINTV(MAX_UNIFORM_BLOCK_SIZE);
	piglit_test_min_int(GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS,
			    MAX_TESS_CONTROL_UNIFORM_COMPONENTS +
			    MAX_TESS_CONTROL_UNIFORM_BLOCKS * (MAX_UNIFORM_BLOCK_SIZE/4));
	piglit_test_min_int(GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS,
			    MAX_TESS_EVALUATION_UNIFORM_COMPONENTS +
			    MAX_TESS_EVALUATION_UNIFORM_BLOCKS * (MAX_UNIFORM_BLOCK_SIZE/4));

	piglit_test_min_int(GL_MAX_COMBINED_UNIFORM_BLOCKS, 60);
	piglit_test_min_int(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 80);

	if (!piglit_check_gl_error(GL_NO_ERROR))
		piglit_report_result(PIGLIT_FAIL);
	piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
void
piglit_init(int argc, char **argv)
{
	GLint layer, index;

	piglit_require_extension("GL_ARB_viewport_array");
	piglit_print_minmax_header();

	piglit_test_min_viewport_dimensions(); /* GL_MAX_VIEWPORT_DIMS */
	piglit_test_min_int(GL_MAX_VIEWPORTS, 16);
	piglit_test_min_int(GL_VIEWPORT_SUBPIXEL_BITS, 0);

	/* ARB_viewport_array extension spec says:
	 *    "NOTE 2: range for viewport bounds:
	 *    On GL3-capable hardware the VIEWPORT_BOUNDS_RANGE should be at
	 *    least [-16384, 16383].
	 *    On GL4-capable hardware the VIEWPORT_BOUNDS_RANGE should be at
	 *    least [-32768, 32767]."
	 */
	/* Since no known way to determine GL3 versus GL4 capable hardware use
	   GL version instead */
	if (piglit_get_gl_version() < 40)
		piglit_test_range_float(GL_VIEWPORT_BOUNDS_RANGE, -16384, 16383);
	else
		piglit_test_range_float(GL_VIEWPORT_BOUNDS_RANGE, -32768, 32767);

	/**
	 * ARB_viewport_array extension spec says regarding PROVOKING_VERTEX:
	 *    "NOTE 3: Valid values are: FIRST_VERTEX_CONVENTION,
	 *    LAST_VERTEX_CONVENTION, PROVOKING_VERTEX, UNDEFINED_VERTEX."
	 */
	glGetIntegerv(GL_LAYER_PROVOKING_VERTEX, &layer);
	switch (layer) {
	case GL_FIRST_VERTEX_CONVENTION:
	case GL_LAST_VERTEX_CONVENTION:
	case GL_PROVOKING_VERTEX:
	case GL_UNDEFINED_VERTEX:
		printf("%s				      %s\n",
		       piglit_get_gl_enum_name(GL_LAYER_PROVOKING_VERTEX),
		       piglit_get_gl_enum_name(layer));
		break;
	default:
		 piglit_minmax_pass = false;
		 printf("Invalid value for GL_LAYER_PROVOKING_VERTEX\n");
		 break;
	}

	glGetIntegerv(GL_VIEWPORT_INDEX_PROVOKING_VERTEX, &index);
	switch (index) {
	case GL_FIRST_VERTEX_CONVENTION:
	case GL_LAST_VERTEX_CONVENTION:
	case GL_PROVOKING_VERTEX:
	case GL_UNDEFINED_VERTEX:
		printf("%s			      %s\n",
		       piglit_get_gl_enum_name(GL_VIEWPORT_INDEX_PROVOKING_VERTEX),
		       piglit_get_gl_enum_name(index));
		break;
	default:
		piglit_minmax_pass = false;
		printf("Invalid value for GL_VIEWPORT_INDEX_PROVOKING_VERTEX\n");
		break;
	}

	if (!piglit_check_gl_error(GL_NO_ERROR))
		piglit_report_result(PIGLIT_FAIL);

	piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
Beispiel #6
0
void
piglit_init(int argc, char **argv)
{
    /* If the value's type is listed as Z in a spec table, then consider
     * its type to be a signed int (that is, GLint or GLint64). If the
     * value's type is listed as Z^+, then consider its type to be
     * unsigned (that is, GLuint or GLuint64).
     */

    GLuint v_blocks;
    GLuint v_uniforms;
    GLuint f_blocks;
    GLuint f_uniforms;
    GLuint64 blocksize;

    piglit_print_minmax_header();

    glGetIntegerv(GL_MAX_VERTEX_UNIFORM_BLOCKS,     (GLint*) &v_blocks);
    glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, (GLint*) &v_uniforms);
    glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS,   (GLint*) &f_blocks);
    glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, (GLint*) &f_uniforms);
    glGetInteger64v(GL_MAX_UNIFORM_BLOCK_SIZE, (GLint64*) &blocksize);

    /* Table 6.27 */
    piglit_test_min_uint64(GL_MAX_ELEMENT_INDEX, (1 << 24) - 1);
    piglit_test_min_uint(GL_SUBPIXEL_BITS, 4);
    piglit_test_min_uint(GL_MAX_3D_TEXTURE_SIZE, 256);
    piglit_test_min_uint(GL_MAX_TEXTURE_SIZE, 2048);
    piglit_test_min_uint(GL_MAX_ARRAY_TEXTURE_LAYERS, 256);
    piglit_test_min_float(GL_MAX_TEXTURE_LOD_BIAS, 2.0);
    piglit_test_min_uint(GL_MAX_CUBE_MAP_TEXTURE_SIZE, 2048);
    piglit_test_min_uint(GL_MAX_RENDERBUFFER_SIZE, 2048);
    piglit_test_min_uint(GL_MAX_DRAW_BUFFERS, 4);
    piglit_test_min_uint(GL_MAX_COLOR_ATTACHMENTS, 4);
    piglit_test_min_viewport_dimensions();
    piglit_test_range_float(GL_ALIASED_POINT_SIZE_RANGE, 1, 1);
    piglit_test_range_float(GL_ALIASED_LINE_WIDTH_RANGE, 1, 1);

    /* Table 6.28 */
    piglit_test_min_uint(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 10);
    piglit_test_min_uint(GL_NUM_PROGRAM_BINARY_FORMATS, 0);
    piglit_test_min_uint(GL_NUM_SHADER_BINARY_FORMATS, 0);
    piglit_test_min_uint(GL_MAX_SERVER_WAIT_TIMEOUT, 0);

    /* Table 6.29 */
    piglit_test_min_int(GL_MAJOR_VERSION, 3);

    /* Table 6.30 */
    piglit_test_min_uint(GL_MAX_VERTEX_ATTRIBS, 16);
    piglit_test_min_uint(GL_MAX_VERTEX_UNIFORM_COMPONENTS, 1024);
    piglit_test_min_uint(GL_MAX_VERTEX_UNIFORM_VECTORS, 256);
    piglit_test_min_uint(GL_MAX_VERTEX_UNIFORM_BLOCKS, 12);
    piglit_test_min_uint(GL_MAX_VERTEX_UNIFORM_COMPONENTS, 64);
    piglit_test_min_uint(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 16);

    /* Table 6.31 */
    piglit_test_min_uint(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 896);
    piglit_test_min_uint(GL_MAX_FRAGMENT_UNIFORM_VECTORS, 224);
    piglit_test_min_uint(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, 12);
    piglit_test_min_uint(GL_MAX_FRAGMENT_INPUT_COMPONENTS, 60);
    piglit_test_min_uint(GL_MAX_TEXTURE_IMAGE_UNITS, 16);
    piglit_test_max_int(GL_MIN_PROGRAM_TEXEL_OFFSET, -8);
    piglit_test_min_int(GL_MAX_PROGRAM_TEXEL_OFFSET, 7);

    /* Table 6.32 */
    piglit_test_min_uint(GL_MAX_UNIFORM_BUFFER_BINDINGS, 24);
    piglit_test_min_uint64(GL_MAX_UNIFORM_BLOCK_SIZE, 16384);
    piglit_test_min_uint(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, 1);
    piglit_test_min_uint(GL_MAX_COMBINED_UNIFORM_BLOCKS, 24);
    piglit_test_min_uint64(GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, v_blocks * blocksize / 4 + v_uniforms);
    piglit_test_min_uint64(GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, f_blocks * blocksize / 4 + f_uniforms);
    piglit_test_min_uint64(GL_MAX_VARYING_COMPONENTS, 60);
    piglit_test_min_uint64(GL_MAX_VARYING_VECTORS, 15);
    piglit_test_min_uint64(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 32);

    /* Table 6.33 */
    piglit_test_min_uint(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, 64);
    piglit_test_min_uint(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, 4);
    piglit_test_min_uint(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, 4);

    /* Table 6.34 */
    piglit_test_min_uint(GL_SAMPLE_BUFFERS, 0);
    piglit_test_min_uint(GL_SAMPLES, 0);
    piglit_test_min_uint(GL_MAX_SAMPLES, 4);


    if (!piglit_check_gl_error(GL_NO_ERROR))
        piglit_report_result(PIGLIT_FAIL);

    piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
Beispiel #7
0
void
piglit_init(int argc, char **argv)
{
	piglit_require_gl_version(30);

	piglit_print_minmax_header();

	/* These should be in the section with "Minimum Value" but
	 * appear in the section with "Initial Value".
	 */
	piglit_test_min_int(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, 64);
	piglit_test_min_int(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, 4);
	piglit_test_min_int(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, 4);

	piglit_test_min_int(GL_MAX_LIGHTS, 8);
	piglit_test_min_int(GL_MAX_CLIP_PLANES, 6);
	if (piglit_is_extension_supported("GL_ARB_imaging"))
		piglit_test_min_int(GL_MAX_COLOR_MATRIX_STACK_DEPTH, 2);
	piglit_test_min_int(GL_MAX_MODELVIEW_STACK_DEPTH, 32);
	piglit_test_min_int(GL_MAX_PROJECTION_STACK_DEPTH, 2);
	piglit_test_min_int(GL_MAX_TEXTURE_STACK_DEPTH, 2);
	piglit_test_min_int(GL_SUBPIXEL_BITS, 4);
	piglit_test_min_int(GL_MAX_3D_TEXTURE_SIZE, 256);
	piglit_test_min_int(GL_MAX_TEXTURE_SIZE, 1024);
	piglit_test_min_float(GL_MAX_TEXTURE_LOD_BIAS, 2.0);
	piglit_test_min_int(GL_MAX_ARRAY_TEXTURE_LAYERS, 256);
	piglit_test_min_int(GL_MAX_CUBE_MAP_TEXTURE_SIZE, 1024);
	piglit_test_min_int(GL_MAX_RENDERBUFFER_SIZE, 1024);
	piglit_test_min_int(GL_MAX_PIXEL_MAP_TABLE, 32);
	piglit_test_min_int(GL_MAX_NAME_STACK_DEPTH, 64);
	piglit_test_min_int(GL_MAX_LIST_NESTING, 64);
	piglit_test_min_int(GL_MAX_EVAL_ORDER, 8);

	piglit_test_min_viewport_dimensions();

	piglit_test_min_int(GL_MAX_ATTRIB_STACK_DEPTH, 16);
	piglit_test_min_int(GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, 16);

	piglit_test_range_float(GL_ALIASED_POINT_SIZE_RANGE, 1, 1);
	piglit_test_range_float(GL_SMOOTH_POINT_SIZE_RANGE, 1, 1);
	piglit_test_range_float(GL_ALIASED_LINE_WIDTH_RANGE, 1, 1);
	piglit_test_range_float(GL_SMOOTH_LINE_WIDTH_RANGE, 1, 1);

	piglit_test_tf_bits(GL_PRIMITIVES_GENERATED);
	piglit_test_tf_bits(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
	piglit_test_oq_bits();

	if (piglit_is_extension_supported("GL_ARB_imaging")) {
		/* FINISHME: GL_MAX_CONVOLUTION_WIDTH */
		/* FINISHME: GL_MAX_CONVOLUTION_HEIGHT */
	}

	piglit_test_min_int(GL_MAX_TEXTURE_UNITS, 2);
	piglit_test_min_int(GL_MAX_VERTEX_ATTRIBS, 16);
	piglit_test_min_int(GL_MAX_VERTEX_UNIFORM_COMPONENTS, 1024);
	piglit_test_min_int(GL_MAX_VARYING_COMPONENTS, 64);
	piglit_test_min_int(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 16);
	piglit_test_min_int(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 16);
	piglit_test_min_int(GL_MAX_TEXTURE_IMAGE_UNITS, 16);
	piglit_test_min_int(GL_MAX_TEXTURE_COORDS, 8);
	piglit_test_min_int(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, 1024);

	piglit_test_max_int(GL_MIN_PROGRAM_TEXEL_OFFSET, -8);
	piglit_test_min_int(GL_MAX_PROGRAM_TEXEL_OFFSET, 7);

	piglit_test_min_int(GL_AUX_BUFFERS, 0);
	piglit_test_min_int(GL_MAX_DRAW_BUFFERS, 8);

	piglit_test_min_int(GL_SAMPLE_BUFFERS, 0);
	piglit_test_min_int(GL_SAMPLES, 0);
	piglit_test_min_int(GL_MAX_COLOR_ATTACHMENTS, 8);
	piglit_test_min_int(GL_MAX_SAMPLES, 4);

	if (!piglit_check_gl_error(GL_NO_ERROR))
		piglit_report_result(PIGLIT_FAIL);

	piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL);
}