[Piglit] [PATCH 33/63] shader_runner: Add a “draw arrays instanced base” command
Alejandro Piñeiro
apinheiro at igalia.com
Sat Feb 23 23:45:21 UTC 2019
From: Neil Roberts <nroberts at igalia.com>
This is just like “draw arrays instanced” but has an extra parameter
to set the baseinstance.
---
tests/shaders/shader_runner.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 778229e2a..c53980b20 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -4855,6 +4855,16 @@ piglit_display(void)
size_t primcount = (size_t) z;
draw_arrays_common(first, count);
glDrawArraysInstanced(mode, first, count, primcount);
+ } else if (sscanf(line, "draw arrays instanced base %31s %d %d %d %d", s, &x, &y, &z, &w) == 5) {
+ GLenum mode = decode_drawing_mode(s);
+ int first = x;
+ size_t count = (size_t) y;
+ size_t primcount = (size_t) z;
+ GLuint baseinstance = (GLuint) w;
+ draw_arrays_common(first, count);
+ glDrawArraysInstancedBaseInstance(mode, first, count,
+ primcount,
+ baseinstance);
} else if (sscanf(line, "draw arrays %31s %d %d", s, &x, &y) == 3) {
GLenum mode = decode_drawing_mode(s);
int first = x;
--
2.19.1
More information about the Piglit
mailing list