From 3bb713c181ecdc60c218b99f353bf2ac976148b3 Mon Sep 17 00:00:00 2001 From: glevand Date: Tue, 27 Nov 2012 19:42:33 +0000 Subject: [PATCH] test write_backend_label and write_texture_label --- label.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/label.c b/label.c index edc8812..c564196 100644 --- a/label.c +++ b/label.c @@ -194,13 +194,21 @@ main(int argc, char **argv) /* Reset label */ *(uint32_t *) (reports + get_label_area_offset(driver_info) + (label_index << 4)) = 0; + *(uint32_t *) (reports + get_label_area_offset(driver_info) + ((label_index + 1) << 4)) = 0; + *(uint32_t *) (reports + get_label_area_offset(driver_info) + ((label_index + 2) << 4)) = 0; printf("label #%d value 0x%08x\n", label_index, *(uint32_t *) (reports + get_label_area_offset(driver_info) + (label_index << 4))); + printf("label #%d value 0x%08x\n", label_index + 1, + *(uint32_t *) (reports + get_label_area_offset(driver_info) + ((label_index + 1) << 4))); + printf("label #%d value 0x%08x\n", label_index + 2, + *(uint32_t *) (reports + get_label_area_offset(driver_info) + ((label_index + 2) << 4))); /* Write label */ - err += write_label(fifo, label_index, 0xcafebabe); + err += write_label(fifo + err, label_index, 0xcafebabe); + err += write_backend_label(fifo + err, label_index + 1, 0xb00bf00d); + err += write_texture_label(fifo + err, label_index + 2, 0xdeadbeef); control[0x10] = fifo_gaddr + err * sizeof(uint32_t); @@ -217,6 +225,10 @@ main(int argc, char **argv) printf("label #%d value 0x%08x\n", label_index, *(uint32_t *) (reports + get_label_area_offset(driver_info) + (label_index << 4))); + printf("label #%d value 0x%08x\n", label_index + 1, + *(uint32_t *) (reports + get_label_area_offset(driver_info) + ((label_index + 1) << 4))); + printf("label #%d value 0x%08x\n", label_index + 2, + *(uint32_t *) (reports + get_label_area_offset(driver_info) + ((label_index + 2) << 4))); /* Destroy GPU context */ -- 2.11.4.GIT