Beispiel #1
0
int
main (int argc, char **argv)
{
    int i;

    for (i = 0; i < sizeof (info) / sizeof (info[0]); ++i)
	test_composite (&info[i]);
    
    return 0;
}
Beispiel #2
0
int main(int argc, char **argv)
{
/*
[  1340.257] (II) freedreno(0): MSMCheckComposite:590 op:12: 0x2eb268 {20028888, 0} <- 0x2eb3a8 {08018000, 0} ((nil) {00000000, 0})
[  1340.257] (II) freedreno(0): MSMPrepareComposite:694 0x2eb178 {35x8,256} <- 0x2eb2c8 {1024x320,1024} ((nil) {0x0,0})
[  1340.258] (II) freedreno(0): MSMComposite:766 srcX=0 srcY=0  maskX=0 maskY=0 dstX=0  dstY=2  width=7 height=6
 */

	test_composite(C2D_ALPHA_BLEND_ADDITIVE,
			ARGB, 35,   8,
			A8,   1024, 320,
			0,    0,    0,
			0, 0, 0, 0, 0, 2, 7, 6);

	return 0;
}
int main(int argc, char **argv)
{
	/* create dummy pixmap to get initialization out of the way */
	c2d_ts_handle curTimestamp;
	PixmapPtr tmp = create_pixmap(64, 64, xRGB);
	CHK(c2dFlush(tmp->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

/*
[  1340.257] (II) freedreno(0): MSMCheckComposite:590 op:12: 0x2eb268 {20028888, 0} <- 0x2eb3a8 {08018000, 0} ((nil) {00000000, 0})
[  1340.257] (II) freedreno(0): MSMPrepareComposite:694 0x2eb178 {35x8,256} <- 0x2eb2c8 {1024x320,1024} ((nil) {0x0,0})
[  1340.258] (II) freedreno(0): MSMComposite:766 srcX=0 srcY=0  maskX=0 maskY=0 dstX=0  dstY=2  width=7 height=6
 */

	test_composite(C2D_ALPHA_BLEND_ADDITIVE,
			ARGB, 35,   8,
			A8,   1024, 320,
			0,    0,    0,
			0, 0, 0, 0, 0, 2, 7, 6);

	return 0;
}
Beispiel #4
0
int main(int argc, char **argv)
{
	uint32_t i, j, k, l;

	TEST_START();

	/* NOTE: my assumption here is that repeat, op, and color formats
	 * are rather independent, so we don't need to dump every possible
	 * combination (which would be a huge list)..  possibly need to
	 * sanity check this assumption, though..
	 */

	/* test composite ops: */
	for (i = 0; i < ARRAY_SIZE(blend_modes); i++) {
		TEST(test_composite("composite-op", &blend_modes[i],
				&format_modes[2], 17, 19,
				&format_modes[0], FALSE, 17, 19,
				NULL, FALSE, 17, 19));
	}

	/* test formats, by dst: */
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		char name[32];
		sprintf(name, "composite-dst-%s", format_modes[i].name);
		for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
			// TODO add mask:
			TEST(test_composite(name, &blend_modes[4],
					&format_modes[i], 17, 19,
					&format_modes[j], FALSE, 17, 19,
					NULL, FALSE, 17, 19));
		}
	}

	/* test formats, by src: */
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		char name[32];
		sprintf(name, "composite-src-%s", format_modes[i].name);
		for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
			// TODO add mask:
			TEST(test_composite(name, &blend_modes[4],
					&format_modes[j], 17, 19,
					&format_modes[i], FALSE, 17, 19,
					NULL, FALSE, 17, 19));
		}
	}

	/* test all combinations of src/dst/mask/op: */
	for (l = 0; l < ARRAY_SIZE(blend_modes); l++) {
		for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
			for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
				for (k = 0; k < ARRAY_SIZE(format_modes); k++) {
					TEST(test_composite("composite-all", &blend_modes[l],
							&format_modes[i], 17, 19,
							&format_modes[j], FALSE, 17, 19,
							&format_modes[k], FALSE, 17, 19));
				}
				TEST(test_composite("composite-all", &blend_modes[l],
						&format_modes[i], 17, 19,
						&format_modes[j], FALSE, 17, 19,
						NULL, FALSE, 17, 19));
			}
		}
	}

	/* test with/without mask: */
	TEST(test_composite("composite-mask", &blend_modes[3],
			&format_modes[0], 17, 19,
			&format_modes[0], FALSE, 17, 19,
			NULL, FALSE, 17, 19));
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		TEST(test_composite("composite-mask", &blend_modes[3],
				&format_modes[0], 17, 19,
				&format_modes[0], FALSE, 17, 19,
				&format_modes[i], FALSE, 17, 19));
	}

	/* test repeat: */
	TEST(test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0], 17, 19,
			&format_modes[0], FALSE, 17, 19,
			NULL, FALSE, 17, 19));
	TEST(test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0], 17, 19,
			&format_modes[0], TRUE, 5, 5,
			NULL, FALSE, 0, 0));
	TEST(test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0], 17, 19,
			&format_modes[0], TRUE, 6, 6,
			NULL, FALSE, 0, 0));
	TEST(test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0], 17, 19,
			&format_modes[0], TRUE, 7, 7,
			&format_modes[2], TRUE, 5, 5));
	TEST(test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0], 17, 19,
			&format_modes[0], TRUE, 8, 8,
			&format_modes[2], TRUE, 1, 1));

	TEST_END();

	return 0;
}
int main(int argc, char **argv)
{
	uint32_t i, j;

	/* create dummy pixmap to get initialization out of the way */
	c2d_ts_handle curTimestamp;
	PixmapPtr tmp = create_pixmap(64, 64, xRGB);
	CHK(c2dFlush(tmp->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	/* NOTE: my assumption here is that repeat, op, and color formats
	 * are rather independent, so we don't need to dump every possible
	 * combination (which would be a huge list)..  possibly need to
	 * sanity check this assumption, though..
	 */

	/* test composite ops: */
	for (i = 0; i < ARRAY_SIZE(blend_modes); i++) {
		test_composite("composite-op", &blend_modes[i],
				&format_modes[2],
				&format_modes[0], FALSE,
				NULL, FALSE);
	}

	/* test formats, by dst: */
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		char name[32];
		sprintf(name, "composite-dst-%s", format_modes[i].name);
		for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
			// TODO add mask:
			test_composite(name, &blend_modes[4],
					&format_modes[i],
					&format_modes[j], FALSE,
					NULL, FALSE);
		}
	}

	/* test formats, by src: */
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		char name[32];
		sprintf(name, "composite-src-%s", format_modes[i].name);
		for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
			// TODO add mask:
			test_composite(name, &blend_modes[4],
					&format_modes[j],
					&format_modes[i], FALSE,
					NULL, FALSE);
		}
	}

	/* test with/without mask: */
	test_composite("composite-mask", &blend_modes[3],
			&format_modes[0],
			&format_modes[0], FALSE,
			NULL, FALSE);
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		test_composite("composite-mask", &blend_modes[3],
				&format_modes[0],
				&format_modes[0], FALSE,
				&format_modes[i], FALSE);
	}

	/* test repeat: */
	// TODO add mask:
	test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0],
			&format_modes[0], FALSE,
			NULL, FALSE);
	test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0],
			&format_modes[0], TRUE,
			NULL, FALSE);

	return 0;
}
Beispiel #6
0
int main(){
    test_composite();
    test_observer();
    return 0;
}