[Piglit] [PATCH 5/7] ARB_pipeline_statistics_query (geom): basic test
Ilia Mirkin
imirkin at alum.mit.edu
Fri Feb 13 23:04:46 PST 2015
On Sat, Feb 14, 2015 at 1:54 AM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
> +const char *gs_src =
> + "#version 150 \n"
> + "layout(triangles) in; \n"
> + "layout(triangle_strip, max_vertices = 3) out; \n"
> + "in vec4 vertex_to_gs[3]; \n"
> + "void main() \n"
> + "{ \n"
> + " for (int i = 0; i < 3; i++) { \n"
> + " gl_Position = vertex_to_gs[i]; \n"
> + " EmitVertex(); \n"
> + " } \n"
> + "} \n";
> +
> +#ifdef DISPLAY
> +const char *fs_src =
> + "#version 150 \n"
> + "out vec4 color; \n"
> + "void main() \n"
> + "{ \n"
> + " color = vec4(0.0, 1.0, 0.0, 1.0); \n"
> + "} \n";
> +#endif
> +
> +static struct query queries[] = {
> + {
> + .query = GL_GEOMETRY_SHADER_INVOCATIONS,
> + .name = "GL_GEOMETRY_SHADER_INVOCATIONS",
> + .min = NUM_PRIMS},
> + {
> + .query = GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB,
> + .name = "GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB",
> + .min = NUM_PRIMS}
> +};
Maybe emit 2 primitives from each invocation (could just emit the very
same one twice)? That way it's clear which result is which.
-ilia
More information about the Piglit
mailing list