[Piglit] [PATCH 2/4] shader_runner: add "relative probe rect rgba" command

Nicolai Hähnle nhaehnle at gmail.com
Wed May 3 09:52:21 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 tests/shaders/shader_runner.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 39922d3..b990887 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -3387,21 +3387,33 @@ piglit_display(void)
 				  c + 0, c + 1, c + 2, c + 3,
 				  c + 4, c + 5, c + 6) == 7) {
 			x = c[0] * read_width;
 			y = c[1] * read_height;
 			w = c[2] * read_width;
 			h = c[3] * read_height;
 
 			if (!piglit_probe_rect_rgb(x, y, w, h, &c[4])) {
 				result = PIGLIT_FAIL;
 			}
+		} else if (sscanf(line, "relative probe rect rgba "
+				  "( %f , %f , %f , %f ) "
+				  "( %f , %f , %f , %f )",
+				  c + 0, c + 1, c + 2, c + 3,
+				  c + 4, c + 5, c + 6, c + 7) == 8) {
+			x = c[0] * read_width;
+			y = c[1] * read_height;
+			w = c[2] * read_width;
+			h = c[3] * read_height;
 
+			if (!piglit_probe_rect_rgba(x, y, w, h, &c[4])) {
+				result = PIGLIT_FAIL;
+			}
 		} else if (sscanf(line, "relative probe rect rgba int "
 				  "( %f , %f , %f , %f ) "
 				  "( %d , %d , %d , %d )",
 				  c + 0, c + 1, c + 2, c + 3,
 				  &x, &y, &z, &w) == 8) {
 			const int expected[] = { x, y, z, w };
 			if (!piglit_probe_rect_rgba_int(c[0] * read_width,
 							c[1] * read_height,
 							c[2] * read_width,
 							c[3] * read_height,
-- 
2.9.3



More information about the Piglit mailing list