Home | History | Annotate | Download | only in unit

Lines Matching refs:format_desc

56 print_packed(const struct util_format_description *format_desc,
65 for (i = 0; i < format_desc->block.bits/8; ++i) {
75 print_unpacked_rgba_doubl(const struct util_format_description *format_desc,
84 for (i = 0; i < format_desc->block.height; ++i) {
85 for (j = 0; j < format_desc->block.width; ++j) {
97 print_unpacked_rgba_float(const struct util_format_description *format_desc,
106 for (i = 0; i < format_desc->block.height; ++i) {
107 for (j = 0; j < format_desc->block.width; ++j) {
119 print_unpacked_rgba_8unorm(const struct util_format_description *format_desc,
128 for (i = 0; i < format_desc->block.height; ++i) {
129 for (j = 0; j < format_desc->block.width; ++j) {
140 print_unpacked_z_float(const struct util_format_description *format_desc,
149 for (i = 0; i < format_desc->block.height; ++i) {
150 for (j = 0; j < format_desc->block.width; ++j) {
162 print_unpacked_z_32unorm(const struct util_format_description *format_desc,
171 for (i = 0; i < format_desc->block.height; ++i) {
172 for (j = 0; j < format_desc->block.width; ++j) {
183 print_unpacked_s_8uint(const struct util_format_description *format_desc,
192 for (i = 0; i < format_desc->block.height; ++i) {
193 for (j = 0; j < format_desc->block.width; ++j) {
204 test_format_fetch_rgba_float(const struct util_format_description *format_desc,
212 for (i = 0; i < format_desc->block.height; ++i) {
213 for (j = 0; j < format_desc->block.width; ++j) {
214 format_desc->fetch_rgba_float(unpacked[i][j], test->packed, j, i);
224 print_unpacked_rgba_float(format_desc, "FAILED: ", unpacked, " obtained\n");
225 print_unpacked_rgba_doubl(format_desc, " ", test->unpacked, " expected\n");
233 test_format_unpack_rgba_float(const struct util_format_description *format_desc,
240 format_desc->unpack_rgba_float(&unpacked[0][0][0], sizeof unpacked[0],
242 format_desc->block.width, format_desc->block.height);
245 for (i = 0; i < format_desc->block.height; ++i) {
246 for (j = 0; j < format_desc->block.width; ++j) {
256 print_unpacked_rgba_float(format_desc, "FAILED: ", unpacked, " obtained\n");
257 print_unpacked_rgba_doubl(format_desc, " ", test->unpacked, " expected\n");
265 test_format_pack_rgba_float(const struct util_format_description *format_desc,
283 for (i = 0; i < format_desc->block.height; ++i) {
284 for (j = 0; j < format_desc->block.width; ++j) {
291 format_desc->pack_rgba_float(packed, 0,
293 format_desc->block.width, format_desc->block.height);
296 for (i = 0; i < format_desc->block.bits/8; ++i) {
306 print_packed(format_desc, "FAILED: ", packed, " obtained\n");
307 print_packed(format_desc, " ", test->packed, " expected\n");
339 test_format_unpack_rgba_8unorm(const struct util_format_description *format_desc,
347 format_desc->unpack_rgba_8unorm(&unpacked[0][0][0], sizeof unpacked[0],
349 format_desc->block.width, format_desc->block.height);
354 for (i = 0; i < format_desc->block.height; ++i) {
355 for (j = 0; j < format_desc->block.width; ++j) {
369 print_unpacked_rgba_8unorm(format_desc, "FAILED: ", unpacked, " obtained\n");
370 print_unpacked_rgba_8unorm(format_desc, " ", expected, " expected\n");
378 test_format_pack_rgba_8unorm(const struct util_format_description *format_desc,
404 format_desc->pack_rgba_8unorm(packed, 0,
406 format_desc->block.width, format_desc->block.height);
409 for (i = 0; i < format_desc->block.bits/8; ++i)
426 print_packed(format_desc, "FAILED: ", packed, " obtained\n");
427 print_packed(format_desc, " ", test->packed, " expected\n");
435 test_format_unpack_z_float(const struct util_format_description *format_desc,
442 format_desc->unpack_z_float(&unpacked[0][0], sizeof unpacked[0],
444 format_desc->block.width, format_desc->block.height);
447 for (i = 0; i < format_desc->block.height; ++i) {
448 for (j = 0; j < format_desc->block.width; ++j) {
456 print_unpacked_z_float(format_desc, "FAILED: ", unpacked, " obtained\n");
457 print_unpacked_rgba_doubl(format_desc, " ", test->unpacked, " expected\n");
465 test_format_pack_z_float(const struct util_format_description *format_desc,
474 for (i = 0; i < format_desc->block.height; ++i) {
475 for (j = 0; j < format_desc->block.width; ++j) {
483 format_desc->pack_z_float(packed, 0,
485 format_desc->block.width, format_desc->block.height);
488 for (i = 0; i < format_desc->block.bits/8; ++i)
493 print_packed(format_desc, "FAILED: ", packed, " obtained\n");
494 print_packed(format_desc, " ", test->packed, " expected\n");
502 test_format_unpack_z_32unorm(const struct util_format_description *format_desc,
510 format_desc->unpack_z_32unorm(&unpacked[0][0], sizeof unpacked[0],
512 format_desc->block.width, format_desc->block.height);
514 for (i = 0; i < format_desc->block.height; ++i) {
515 for (j = 0; j < format_desc->block.width; ++j) {
521 for (i = 0; i < format_desc->block.height; ++i) {
522 for (j = 0; j < format_desc->block.width; ++j) {
530 print_unpacked_z_32unorm(format_desc, "FAILED: ", unpacked, " obtained\n");
531 print_unpacked_z_32unorm(format_desc, " ", expected, " expected\n");
539 test_format_pack_z_32unorm(const struct util_format_description *format_desc,
547 for (i = 0; i < format_desc->block.height; ++i) {
548 for (j = 0; j < format_desc->block.width; ++j) {
558 format_desc->pack_z_32unorm(packed, 0,
560 format_desc->block.width, format_desc->block.height);
563 for (i = 0; i < format_desc->block.bits/8; ++i)
568 print_packed(format_desc, "FAILED: ", packed, " obtained\n");
569 print_packed(format_desc, " ", test->packed, " expected\n");
577 test_format_unpack_s_8uint(const struct util_format_description *format_desc,
585 format_desc->unpack_s_8uint(&unpacked[0][0], sizeof unpacked[0],
587 format_desc->block.width, format_desc->block.height);
589 for (i = 0; i < format_desc->block.height; ++i) {
590 for (j = 0; j < format_desc->block.width; ++j) {
596 for (i = 0; i < format_desc->block.height; ++i) {
597 for (j = 0; j < format_desc->block.width; ++j) {
605 print_unpacked_s_8uint(format_desc, "FAILED: ", unpacked, " obtained\n");
606 print_unpacked_s_8uint(format_desc, " ", expected, " expected\n");
614 test_format_pack_s_8uint(const struct util_format_description *format_desc,
622 for (i = 0; i < format_desc->block.height; ++i) {
623 for (j = 0; j < format_desc->block.width; ++j) {
633 format_desc->pack_s_8uint(packed, 0,
635 format_desc->block.width, format_desc->block.height);
638 for (i = 0; i < format_desc->block.bits/8; ++i)
643 print_packed(format_desc, "FAILED: ", packed, " obtained\n");
644 print_packed(format_desc, " ", test->packed, " expected\n");
652 (*test_func_t)(const struct util_format_description *format_desc,
657 test_one_func(const struct util_format_description *format_desc,
665 format_desc->short_name, suffix);
671 if (test->format == format_desc->format) {
672 if (!func(format_desc, &util_format_test_cases[i])) {
689 const struct util_format_description *format_desc;
691 format_desc = util_format_description(format);
692 if (!format_desc) {
696 if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC &&
702 if (format_desc->name) { \
703 if (!test_one_func(format_desc, &test_format_##name, #name)) { \