[04/10] nv_conditional_render: port tests to gles3

Submitted by Erik Faye-Lund on Nov. 5, 2018, 5:23 p.m.

Details

Message ID 20181105172335.17229-5-erik.faye-lund@collabora.com
State New
Headers show
Series "port NV_conditional_render tests to GLES3" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Erik Faye-Lund Nov. 5, 2018, 5:23 p.m.
These two tests are trivial to port to GLES 3.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
---
 tests/spec/nv_conditional_render/CMakeLists.gles3.txt | 6 ++++++
 tests/spec/nv_conditional_render/begin-while-active.c | 4 ++++
 tests/spec/nv_conditional_render/begin-zero.c         | 5 +++++
 3 files changed, 15 insertions(+)
 create mode 100644 tests/spec/nv_conditional_render/CMakeLists.gles3.txt

Patch hide | download patch | download mbox

diff --git a/tests/spec/nv_conditional_render/CMakeLists.gles3.txt b/tests/spec/nv_conditional_render/CMakeLists.gles3.txt
new file mode 100644
index 000000000..5cd5970ff
--- /dev/null
+++ b/tests/spec/nv_conditional_render/CMakeLists.gles3.txt
@@ -0,0 +1,6 @@ 
+link_libraries(piglitutil_${piglit_target_api})
+
+piglit_add_executable (nv_conditional_render-begin-while-active_gles3 begin-while-active.c)
+piglit_add_executable (nv_conditional_render-begin-zero_gles3 begin-zero.c)
+
+# vim: ft=cmake:
diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c
index 821544113..9b8488763 100644
--- a/tests/spec/nv_conditional_render/begin-while-active.c
+++ b/tests/spec/nv_conditional_render/begin-while-active.c
@@ -42,7 +42,11 @@ 
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
+#ifdef PIGLIT_USE_OPENGL
 	config.supports_gl_compat_version = 10;
+#else // PIGLIT_USE_OPENGL_ES3
+	config.supports_gl_es_version = 30;
+#endif
 
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA;
 	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
diff --git a/tests/spec/nv_conditional_render/begin-zero.c b/tests/spec/nv_conditional_render/begin-zero.c
index 85304643c..0777d5c70 100644
--- a/tests/spec/nv_conditional_render/begin-zero.c
+++ b/tests/spec/nv_conditional_render/begin-zero.c
@@ -40,7 +40,12 @@ 
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
+#ifdef PIGLIT_USE_OPENGL
 	config.supports_gl_compat_version = 10;
+#else // PIGLIT_USE_OPENGL_ES3
+	config.supports_gl_es_version = 30;
+#endif
+
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA;
 	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 

Comments

Unless there's something that makes this a pain for ES2, I'd rather
these tests were runnable with gl_es_version = 20. You can test with
MESA_GLES_VERSION_OVERRIDE=20.
On Mon, Nov 5, 2018 at 12:23 PM Erik Faye-Lund
<erik.faye-lund@collabora.com> wrote:
>
> These two tests are trivial to port to GLES 3.
>
> Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
> ---
>  tests/spec/nv_conditional_render/CMakeLists.gles3.txt | 6 ++++++
>  tests/spec/nv_conditional_render/begin-while-active.c | 4 ++++
>  tests/spec/nv_conditional_render/begin-zero.c         | 5 +++++
>  3 files changed, 15 insertions(+)
>  create mode 100644 tests/spec/nv_conditional_render/CMakeLists.gles3.txt
>
> diff --git a/tests/spec/nv_conditional_render/CMakeLists.gles3.txt b/tests/spec/nv_conditional_render/CMakeLists.gles3.txt
> new file mode 100644
> index 000000000..5cd5970ff
> --- /dev/null
> +++ b/tests/spec/nv_conditional_render/CMakeLists.gles3.txt
> @@ -0,0 +1,6 @@
> +link_libraries(piglitutil_${piglit_target_api})
> +
> +piglit_add_executable (nv_conditional_render-begin-while-active_gles3 begin-while-active.c)
> +piglit_add_executable (nv_conditional_render-begin-zero_gles3 begin-zero.c)
> +
> +# vim: ft=cmake:
> diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c
> index 821544113..9b8488763 100644
> --- a/tests/spec/nv_conditional_render/begin-while-active.c
> +++ b/tests/spec/nv_conditional_render/begin-while-active.c
> @@ -42,7 +42,11 @@
>
>  PIGLIT_GL_TEST_CONFIG_BEGIN
>
> +#ifdef PIGLIT_USE_OPENGL
>         config.supports_gl_compat_version = 10;
> +#else // PIGLIT_USE_OPENGL_ES3
> +       config.supports_gl_es_version = 30;
> +#endif
>
>         config.window_visual = PIGLIT_GL_VISUAL_RGBA;
>         config.khr_no_error_support = PIGLIT_HAS_ERRORS;
> diff --git a/tests/spec/nv_conditional_render/begin-zero.c b/tests/spec/nv_conditional_render/begin-zero.c
> index 85304643c..0777d5c70 100644
> --- a/tests/spec/nv_conditional_render/begin-zero.c
> +++ b/tests/spec/nv_conditional_render/begin-zero.c
> @@ -40,7 +40,12 @@
>
>  PIGLIT_GL_TEST_CONFIG_BEGIN
>
> +#ifdef PIGLIT_USE_OPENGL
>         config.supports_gl_compat_version = 10;
> +#else // PIGLIT_USE_OPENGL_ES3
> +       config.supports_gl_es_version = 30;
> +#endif
> +
>         config.window_visual = PIGLIT_GL_VISUAL_RGBA;
>         config.khr_no_error_support = PIGLIT_HAS_ERRORS;
>
> --
> 2.19.1
>
> _______________________________________________
> Piglit mailing list
> Piglit@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
<erik.faye-lund@collabora.com> wrote:
>
>
>
> On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>
> Unless there's something that makes this a pain for ES2, I'd rather
> these tests were runnable with gl_es_version = 20. You can test with
> MESA_GLES_VERSION_OVERRIDE=20.
>
>
> Yeah, I already started on this. There's a few of them that won't work on es2, like the blitframebuffer test etc. I'll send an updated version soon.

It's not necessary to kill yourself making all of these work in ES2.
If they don't work without larger changes, keep them at ES3.
On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> <erik.faye-lund@collabora.com> wrote:
> > 
> > 
> > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > 
> > Unless there's something that makes this a pain for ES2, I'd rather
> > these tests were runnable with gl_es_version = 20. You can test
> > with
> > MESA_GLES_VERSION_OVERRIDE=20.
> > 
> > 
> > Yeah, I already started on this. There's a few of them that won't
> > work on es2, like the blitframebuffer test etc. I'll send an
> > updated version soon.
> 
> It's not necessary to kill yourself making all of these work in ES2.
> If they don't work without larger changes, keep them at ES3.

Yeah, OK. It gets kinda hairy with the ARB_occlusion_query vs
GL_EXT_occlusion_query_boolean bits, at least if we want to support
both. So yeah, perhaps getting the tests running on gles3 is OK for
now?
On Tue, Nov 6, 2018 at 1:14 PM Erik Faye-Lund
<erik.faye-lund@collabora.com> wrote:
>
> On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> > On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> > <erik.faye-lund@collabora.com> wrote:
> > >
> > >
> > > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > >
> > > Unless there's something that makes this a pain for ES2, I'd rather
> > > these tests were runnable with gl_es_version = 20. You can test
> > > with
> > > MESA_GLES_VERSION_OVERRIDE=20.
> > >
> > >
> > > Yeah, I already started on this. There's a few of them that won't
> > > work on es2, like the blitframebuffer test etc. I'll send an
> > > updated version soon.
> >
> > It's not necessary to kill yourself making all of these work in ES2.
> > If they don't work without larger changes, keep them at ES3.
>
> Yeah, OK. It gets kinda hairy with the ARB_occlusion_query vs
> GL_EXT_occlusion_query_boolean bits, at least if we want to support
> both. So yeah, perhaps getting the tests running on gles3 is OK for
> now?

Are you saying that for all of them are hairy? Or just some of them? I
don't think GLES3 occlusion queries are any more full-featured than
GL_EXT_occlusion_query_boolean allows for...

  -ilia
On Tue, 2018-11-06 at 13:25 -0500, Ilia Mirkin wrote:
> On Tue, Nov 6, 2018 at 1:14 PM Erik Faye-Lund
> <erik.faye-lund@collabora.com> wrote:
> > On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> > > On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> > > <erik.faye-lund@collabora.com> wrote:
> > > > 
> > > > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > > > 
> > > > Unless there's something that makes this a pain for ES2, I'd
> > > > rather
> > > > these tests were runnable with gl_es_version = 20. You can test
> > > > with
> > > > MESA_GLES_VERSION_OVERRIDE=20.
> > > > 
> > > > 
> > > > Yeah, I already started on this. There's a few of them that
> > > > won't
> > > > work on es2, like the blitframebuffer test etc. I'll send an
> > > > updated version soon.
> > > 
> > > It's not necessary to kill yourself making all of these work in
> > > ES2.
> > > If they don't work without larger changes, keep them at ES3.
> > 
> > Yeah, OK. It gets kinda hairy with the ARB_occlusion_query vs
> > GL_EXT_occlusion_query_boolean bits, at least if we want to support
> > both. So yeah, perhaps getting the tests running on gles3 is OK for
> > now?
> 
> Are you saying that for all of them are hairy? Or just some of them?
> I
> don't think GLES3 occlusion queries are any more full-featured than
> GL_EXT_occlusion_query_boolean allows for...
> 
>   -ilia

Kinda all of them.

It's about GL_SAMPLES_PASSED vs GL_ANY_SAMPLES_PASSED_EXT and
glGenQueries vs glGenQueriesEXT. Since GL_ANY_SAMPLES_PASSED isn't part
of ARB_occlusion_query (only ARB_occlusion_query2 and
GL_EXT_occlusion_query_boolean), either we need some additional logic
to switch between the enums...

Additionally, it seems I need to use the EXT aliases of the functions
on GLES2. On GLES3, I can use the non-EXT versions that the tests
currently use.

Perhaps for the latter issue, I kinda need to deal with that anyway to
get rid of the OpenGL 2.0 requirement that my first patch does?

These things aren't impossible to solve (perhaps by introducing some
helpers?), but it's a bit more involved than what I'm currently
doing...
On Tue, Nov 6, 2018 at 1:38 PM Erik Faye-Lund
<erik.faye-lund@collabora.com> wrote:
>
> On Tue, 2018-11-06 at 13:25 -0500, Ilia Mirkin wrote:
> > On Tue, Nov 6, 2018 at 1:14 PM Erik Faye-Lund
> > <erik.faye-lund@collabora.com> wrote:
> > > On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> > > > On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> > > > <erik.faye-lund@collabora.com> wrote:
> > > > >
> > > > > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > > > >
> > > > > Unless there's something that makes this a pain for ES2, I'd
> > > > > rather
> > > > > these tests were runnable with gl_es_version = 20. You can test
> > > > > with
> > > > > MESA_GLES_VERSION_OVERRIDE=20.
> > > > >
> > > > >
> > > > > Yeah, I already started on this. There's a few of them that
> > > > > won't
> > > > > work on es2, like the blitframebuffer test etc. I'll send an
> > > > > updated version soon.
> > > >
> > > > It's not necessary to kill yourself making all of these work in
> > > > ES2.
> > > > If they don't work without larger changes, keep them at ES3.
> > >
> > > Yeah, OK. It gets kinda hairy with the ARB_occlusion_query vs
> > > GL_EXT_occlusion_query_boolean bits, at least if we want to support
> > > both. So yeah, perhaps getting the tests running on gles3 is OK for
> > > now?
> >
> > Are you saying that for all of them are hairy? Or just some of them?
> > I
> > don't think GLES3 occlusion queries are any more full-featured than
> > GL_EXT_occlusion_query_boolean allows for...
> >
> >   -ilia
>
> Kinda all of them.
>
> It's about GL_SAMPLES_PASSED vs GL_ANY_SAMPLES_PASSED_EXT and
> glGenQueries vs glGenQueriesEXT. Since GL_ANY_SAMPLES_PASSED isn't part
> of ARB_occlusion_query (only ARB_occlusion_query2 and
> GL_EXT_occlusion_query_boolean), either we need some additional logic
> to switch between the enums...

I'm confused though... how does ES3 help? You still need to use
ANY_SAMPLES on ES3, no?

  -ilia
On Tue, 2018-11-06 at 18:11 -0500, Ilia Mirkin wrote:
> On Tue, Nov 6, 2018 at 1:38 PM Erik Faye-Lund
> <erik.faye-lund@collabora.com> wrote:
> > On Tue, 2018-11-06 at 13:25 -0500, Ilia Mirkin wrote:
> > > On Tue, Nov 6, 2018 at 1:14 PM Erik Faye-Lund
> > > <erik.faye-lund@collabora.com> wrote:
> > > > On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> > > > > On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> > > > > <erik.faye-lund@collabora.com> wrote:
> > > > > > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu>
> > > > > > wrote:
> > > > > > 
> > > > > > Unless there's something that makes this a pain for ES2,
> > > > > > I'd
> > > > > > rather
> > > > > > these tests were runnable with gl_es_version = 20. You can
> > > > > > test
> > > > > > with
> > > > > > MESA_GLES_VERSION_OVERRIDE=20.
> > > > > > 
> > > > > > 
> > > > > > Yeah, I already started on this. There's a few of them that
> > > > > > won't
> > > > > > work on es2, like the blitframebuffer test etc. I'll send
> > > > > > an
> > > > > > updated version soon.
> > > > > 
> > > > > It's not necessary to kill yourself making all of these work
> > > > > in
> > > > > ES2.
> > > > > If they don't work without larger changes, keep them at ES3.
> > > > 
> > > > Yeah, OK. It gets kinda hairy with the ARB_occlusion_query vs
> > > > GL_EXT_occlusion_query_boolean bits, at least if we want to
> > > > support
> > > > both. So yeah, perhaps getting the tests running on gles3 is OK
> > > > for
> > > > now?
> > > 
> > > Are you saying that for all of them are hairy? Or just some of
> > > them?
> > > I
> > > don't think GLES3 occlusion queries are any more full-featured
> > > than
> > > GL_EXT_occlusion_query_boolean allows for...
> > > 
> > >   -ilia
> > 
> > Kinda all of them.
> > 
> > It's about GL_SAMPLES_PASSED vs GL_ANY_SAMPLES_PASSED_EXT and
> > glGenQueries vs glGenQueriesEXT. Since GL_ANY_SAMPLES_PASSED isn't
> > part
> > of ARB_occlusion_query (only ARB_occlusion_query2 and
> > GL_EXT_occlusion_query_boolean), either we need some additional
> > logic
> > to switch between the enums...
> 
> I'm confused though... how does ES3 help? You still need to use
> ANY_SAMPLES on ES3, no?

Good question. For some reason, it passes on ES3 for me without, but
not on ES2. I'll try to figure out why...

In either case, I think you're right, and I'll need to just bite the
bullet on that complication.
On Wed, 2018-11-07 at 09:35 +0100, Erik Faye-Lund wrote:
> On Tue, 2018-11-06 at 18:11 -0500, Ilia Mirkin wrote:
> > On Tue, Nov 6, 2018 at 1:38 PM Erik Faye-Lund
> > <erik.faye-lund@collabora.com> wrote:
> > > On Tue, 2018-11-06 at 13:25 -0500, Ilia Mirkin wrote:
> > > > On Tue, Nov 6, 2018 at 1:14 PM Erik Faye-Lund
> > > > <erik.faye-lund@collabora.com> wrote:
> > > > > On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> > > > > > On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> > > > > > <erik.faye-lund@collabora.com> wrote:
> > > > > > > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu>
> > > > > > > wrote:
> > > > > > > 
> > > > > > > Unless there's something that makes this a pain for ES2,
> > > > > > > I'd
> > > > > > > rather
> > > > > > > these tests were runnable with gl_es_version = 20. You
> > > > > > > can
> > > > > > > test
> > > > > > > with
> > > > > > > MESA_GLES_VERSION_OVERRIDE=20.
> > > > > > > 
> > > > > > > 
> > > > > > > Yeah, I already started on this. There's a few of them
> > > > > > > that
> > > > > > > won't
> > > > > > > work on es2, like the blitframebuffer test etc. I'll send
> > > > > > > an
> > > > > > > updated version soon.
> > > > > > 
> > > > > > It's not necessary to kill yourself making all of these
> > > > > > work
> > > > > > in
> > > > > > ES2.
> > > > > > If they don't work without larger changes, keep them at
> > > > > > ES3.
> > > > > 
> > > > > Yeah, OK. It gets kinda hairy with the ARB_occlusion_query vs
> > > > > GL_EXT_occlusion_query_boolean bits, at least if we want to
> > > > > support
> > > > > both. So yeah, perhaps getting the tests running on gles3 is
> > > > > OK
> > > > > for
> > > > > now?
> > > > 
> > > > Are you saying that for all of them are hairy? Or just some of
> > > > them?
> > > > I
> > > > don't think GLES3 occlusion queries are any more full-featured
> > > > than
> > > > GL_EXT_occlusion_query_boolean allows for...
> > > > 
> > > >   -ilia
> > > 
> > > Kinda all of them.
> > > 
> > > It's about GL_SAMPLES_PASSED vs GL_ANY_SAMPLES_PASSED_EXT and
> > > glGenQueries vs glGenQueriesEXT. Since GL_ANY_SAMPLES_PASSED
> > > isn't
> > > part
> > > of ARB_occlusion_query (only ARB_occlusion_query2 and
> > > GL_EXT_occlusion_query_boolean), either we need some additional
> > > logic
> > > to switch between the enums...
> > 
> > I'm confused though... how does ES3 help? You still need to use
> > ANY_SAMPLES on ES3, no?
> 
> Good question. For some reason, it passes on ES3 for me without, but
> not on ES2. I'll try to figure out why...
> 

get_query_binding_point() in queryobj.c contains this code, which seems
to cause this:

---8<---

   /* From GL_EXT_occlusion_query_boolean spec:
    *
    *    "Accepted by the <target> parameter of BeginQueryEXT,
EndQueryEXT,
    *    and GetQueryivEXT:
    *
    *   ANY_SAMPLES_PASSED_EXT                         0x8C2F
    *   ANY_SAMPLES_PASSED_CONSERVATIVE_EXT            0x8D6A"
    */
   if ((_mesa_is_gles(ctx) && ctx->Version == 20) &&
       (target != GL_ANY_SAMPLES_PASSED &&
        target != GL_ANY_SAMPLES_PASSED_CONSERVATIVE))
      return NULL;

---8<---

It's unclear to me why this check is limited to ES2 like this. I'm
guessing the intention is not prevent
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN here. But it allows
*everything* for ES3, which seems bad.

I'll investigate further and add a patch for this to this series...

> In either case, I think you're right, and I'll need to just bite the
> bullet on that complication.
>
On Wed, 2018-11-07 at 10:18 +0100, Erik Faye-Lund wrote:
> On Wed, 2018-11-07 at 09:35 +0100, Erik Faye-Lund wrote:
> > On Tue, 2018-11-06 at 18:11 -0500, Ilia Mirkin wrote:
> > > On Tue, Nov 6, 2018 at 1:38 PM Erik Faye-Lund
> > > <erik.faye-lund@collabora.com> wrote:
> > > > On Tue, 2018-11-06 at 13:25 -0500, Ilia Mirkin wrote:
> > > > > On Tue, Nov 6, 2018 at 1:14 PM Erik Faye-Lund
> > > > > <erik.faye-lund@collabora.com> wrote:
> > > > > > On Mon, 2018-11-05 at 23:56 -0500, Ilia Mirkin wrote:
> > > > > > > On Mon, Nov 5, 2018 at 1:35 PM Erik Faye-Lund
> > > > > > > <erik.faye-lund@collabora.com> wrote:
> > > > > > > > On Nov 5, 2018 19:20, Ilia Mirkin <imirkin@alum.mit.edu
> > > > > > > > >
> > > > > > > > wrote:
> > > > > > > > 
> > > > > > > > Unless there's something that makes this a pain for
> > > > > > > > ES2,
> > > > > > > > I'd
> > > > > > > > rather
> > > > > > > > these tests were runnable with gl_es_version = 20. You
> > > > > > > > can
> > > > > > > > test
> > > > > > > > with
> > > > > > > > MESA_GLES_VERSION_OVERRIDE=20.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Yeah, I already started on this. There's a few of them
> > > > > > > > that
> > > > > > > > won't
> > > > > > > > work on es2, like the blitframebuffer test etc. I'll
> > > > > > > > send
> > > > > > > > an
> > > > > > > > updated version soon.
> > > > > > > 
> > > > > > > It's not necessary to kill yourself making all of these
> > > > > > > work
> > > > > > > in
> > > > > > > ES2.
> > > > > > > If they don't work without larger changes, keep them at
> > > > > > > ES3.
> > > > > > 
> > > > > > Yeah, OK. It gets kinda hairy with the ARB_occlusion_query
> > > > > > vs
> > > > > > GL_EXT_occlusion_query_boolean bits, at least if we want to
> > > > > > support
> > > > > > both. So yeah, perhaps getting the tests running on gles3
> > > > > > is
> > > > > > OK
> > > > > > for
> > > > > > now?
> > > > > 
> > > > > Are you saying that for all of them are hairy? Or just some
> > > > > of
> > > > > them?
> > > > > I
> > > > > don't think GLES3 occlusion queries are any more full-
> > > > > featured
> > > > > than
> > > > > GL_EXT_occlusion_query_boolean allows for...
> > > > > 
> > > > >   -ilia
> > > > 
> > > > Kinda all of them.
> > > > 
> > > > It's about GL_SAMPLES_PASSED vs GL_ANY_SAMPLES_PASSED_EXT and
> > > > glGenQueries vs glGenQueriesEXT. Since GL_ANY_SAMPLES_PASSED
> > > > isn't
> > > > part
> > > > of ARB_occlusion_query (only ARB_occlusion_query2 and
> > > > GL_EXT_occlusion_query_boolean), either we need some additional
> > > > logic
> > > > to switch between the enums...
> > > 
> > > I'm confused though... how does ES3 help? You still need to use
> > > ANY_SAMPLES on ES3, no?
> > 
> > Good question. For some reason, it passes on ES3 for me without,
> > but
> > not on ES2. I'll try to figure out why...
> > 
> 
> get_query_binding_point() in queryobj.c contains this code, which
> seems
> to cause this:
> 
> ---8<---
> 
>    /* From GL_EXT_occlusion_query_boolean spec:
>     *
>     *    "Accepted by the <target> parameter of BeginQueryEXT,
> EndQueryEXT,
>     *    and GetQueryivEXT:
>     *
>     *   ANY_SAMPLES_PASSED_EXT                         0x8C2F
>     *   ANY_SAMPLES_PASSED_CONSERVATIVE_EXT            0x8D6A"
>     */
>    if ((_mesa_is_gles(ctx) && ctx->Version == 20) &&
>        (target != GL_ANY_SAMPLES_PASSED &&
>         target != GL_ANY_SAMPLES_PASSED_CONSERVATIVE))
>       return NULL;
> 
> ---8<---
> 
> It's unclear to me why this check is limited to ES2 like this. I'm
> guessing the intention is not prevent
> GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN here. But it allows
> *everything* for ES3, which seems bad.
> 
> I'll investigate further and add a patch for this to this series...

Uh, to my Mesa-series :P