On Tue, Feb 17, 2015 at 7:21 PM, Ben Widawsky <benjamin.widaw...@intel.com> wrote: > On Tue, Feb 17, 2015 at 11:41:01AM -0800, Ian Romanick wrote: >> On 02/13/2015 11:02 PM, Ben Widawsky wrote: >> > This was originally part of a single patch which added the extension, and >> > implemented it for i965 classic. For information about the evolution of the >> > patch, please see the subsequent commit. >> > >> > One difference here as compared to the original mega patch is this does >> > build >> > support for the compute shader query. Since it cannot be tested on any >> > platform, >> > it will always return NULL for now. Jordan has already written a patch to >> > address this, and when that patch lands, this logic can be modified. >> > Tesselation >> > shader support still won't build, so it's stubbed out. >> > >> > v2: Fix typo in subject (Brian Paul) >> > Add checks for desktop gl (Ilia) >> > Fail for any callers for now (Ilia) >> > Update QueryCounterBits for new tokens (Ilia) >> > Jordan: Use _mesa_has_compute_shaders >> > >> > Cc: Jordan Justen <jljus...@gmail.com> >> > Cc: Ilia Mirkin <imir...@alum.mit.edu> >> > Signed-off-by: Ben Widawsky <b...@bwidawsk.net> >> > --- >> > .../glapi/gen/ARB_pipeline_statistics_query.xml | 24 ++++++ >> > src/mapi/glapi/gen/Makefile.am | 1 + >> > src/mapi/glapi/gen/gl_API.xml | 3 + >> > src/mesa/main/config.h | 3 + >> > src/mesa/main/extensions.c | 1 + >> > src/mesa/main/mtypes.h | 15 ++++ >> > src/mesa/main/queryobj.c | 91 >> > ++++++++++++++++++++++ >> > 7 files changed, 138 insertions(+) >> > create mode 100644 src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml >> > >> > diff --git a/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml >> > b/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml >> > new file mode 100644 >> > index 0000000..1c66533 >> > --- /dev/null >> > +++ b/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml >> > @@ -0,0 +1,24 @@ >> > +<?xml version="1.0"?> >> > +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> >> > + >> > +<!-- Note: no GLX protocol info yet. --> >> > + >> > +<OpenGLAPI> >> > + >> > +<category name="GL_ARB_pipeline_statistics_query" number="171"> >> > + >> > + <enum name="VERTICES_SUBMITTED" value="0x82EE"/> >> > + <enum name="PRIMITIVES_SUBMITTED" value="0x82EF"/> >> > + <enum name="VERTEX_SHADER_INVOCATIONS" value="0x82F0"/> >> > + <enum name="TESS_CONTROL_SHADER_PATCHES" value="0x82F1"/> >> > + <enum name="TESS_EVALUATION_SHADER_INVOCATIONS" value="0x82F2"/> >> > + <!-- <enum name="GEOMETRY_SHADER_INVOCATIONS" >> > value="0x887F"/> --> >> > + <enum name="GEOMETRY_SHADER_PRIMITIVES_EMITTED" value="0x82F3"/> >> > + <enum name="FRAGMENT_SHADER_INVOCATIONS" value="0x82F4"/> >> > + <enum name="COMPUTE_SHADER_INVOCATIONS" value="0x82F5"/> >> > + <enum name="CLIPPING_INPUT_PRIMITIVES" value="0x82F6"/> >> > + <enum name="CLIPPING_OUTPUT_PRIMITIVES" value="0x82F7"/> >> >> Aren't all of these supposed to have _ARB on the end? >> > > I just copied the other ones which seemed to do a similar thing, and they did > not have ARB. So, I think /not/ but you tell me.
From the spec: New Tokens Accepted by the <target> parameter of BeginQuery, EndQuery, GetQueryiv, BeginQueryIndexed, EndQueryIndexed and GetQueryIndexediv: VERTICES_SUBMITTED_ARB 0x82EE PRIMITIVES_SUBMITTED_ARB 0x82EF VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 GEOMETRY_SHADER_INVOCATIONS 0x887F GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 So I think Ian's right. Only GEOMETRY_SHADER_INVOCATIONS doesn't get the _ARB suffix. Also looking at the Khronos GL headers, they also only have the _ARB-suffixed versions there. -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev