[Mesa-dev] [PATCH v2 09/11] st/mesa: use the occlusion predicate query for GL_ANY_SAMPLES

Ilia Mirkin imirkin at alum.mit.edu
Sun Jan 31 12:56:50 PST 2016


On Sun, Jan 31, 2016 at 3:32 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> This is supposed to return GL_TRUE or GL_FALSE, not the full counter
> value.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---

Errr... hm. Just realized many drivers will fail at this. Oh well,
I'll drop it for now.

>  src/mesa/state_tracker/st_cb_queryobj.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
> index aafae16..b133335 100644
> --- a/src/mesa/state_tracker/st_cb_queryobj.c
> +++ b/src/mesa/state_tracker/st_cb_queryobj.c
> @@ -94,7 +94,8 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
>     switch (q->Target) {
>     case GL_ANY_SAMPLES_PASSED:
>     case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
> -      /* fall-through */
> +      type = PIPE_QUERY_OCCLUSION_PREDICATE;
> +      break;
>     case GL_SAMPLES_PASSED_ARB:
>        type = PIPE_QUERY_OCCLUSION_COUNTER;
>        break;
> --
> 2.4.10
>


More information about the mesa-dev mailing list