[Mesa-dev] [PATCH 3/3] nv50: add PIPE_QUERY_OCCLUSION_PREDICATE support
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sat Feb 6 16:18:36 UTC 2016
On 02/05/2016 03:23 PM, Ilia Mirkin wrote:
> Did I? I thought it was already there, and just forgotten here. Will
> recheck.
You need to add it, otherwise you will hit an assert in begin_query().
>
> On Feb 5, 2016 5:37 AM, "Samuel Pitoiset" <samuel.pitoiset at gmail.com
> <mailto:samuel.pitoiset at gmail.com>> wrote:
>
> This won't fly because you forgot to add
> PIPE_QUERY_OCCLUSION_PREDICATE in many places in nv50_query_hw.c
> (begin_query(), end_query()...).
>
> On 02/04/2016 06:52 PM, Ilia Mirkin wrote:
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu
> <mailto:imirkin at alum.mit.edu>>
> ---
> src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
> b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
> index cccd3b7..3727ac0 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c
> @@ -304,6 +304,9 @@ nv50_hw_get_query_result(struct nv50_context
> *nv50, struct nv50_query *q,
> case PIPE_QUERY_OCCLUSION_COUNTER: /* u32 sequence, u32
> count, u64 time */
> res64[0] = hq->data[1] - hq->data[5];
> break;
> + case PIPE_QUERY_OCCLUSION_PREDICATE:
> + res8[0] = hq->data[1] != hq->data[5];
> + break;
> case PIPE_QUERY_PRIMITIVES_GENERATED: /* u64 count, u64
> time */
> case PIPE_QUERY_PRIMITIVES_EMITTED: /* u64 count, u64 time */
> res64[0] = data64[0] - data64[2];
>
>
> --
> -Samuel
>
More information about the mesa-dev
mailing list