From: Samuel Pitoiset <samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>,
mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
"10.4 10.5"
<mesa-stable-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [Mesa-dev] [PATCH] nv50: allocate more offset space for occlusion queries
Date: Sat, 04 Apr 2015 14:50:34 +0200 [thread overview]
Message-ID: <551FDE1A.1080703@gmail.com> (raw)
In-Reply-To: <1428120023-9598-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
But please, fix the comment in the nv50_query struct, now it is "/* base
+ i * 32 */".
On 04/04/2015 06:00 AM, Ilia Mirkin wrote:
> Commit 1a170980a09 started writing to q->data[4]/[5] but kept the
> per-query space at 16, which meant that in some cases we would write
> past the end of the buffer. Rotate by 32, like nvc0 does.
>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Tested-by: Nick Tenney <nick.tenney@gmail.com>
> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
> ---
> src/gallium/drivers/nouveau/nv50/nv50_query.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query.c b/src/gallium/drivers/nouveau/nv50/nv50_query.c
> index e81ac5a..6a23de4 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_query.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_query.c
> @@ -116,8 +116,8 @@ nv50_query_create(struct pipe_context *pipe, unsigned type, unsigned index)
> q->type = type;
>
> if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
> - q->offset -= 16;
> - q->data -= 16 / sizeof(*q->data); /* we advance before query_begin ! */
> + q->offset -= 32;
> + q->data -= 32 / sizeof(*q->data); /* we advance before query_begin ! */
> }
>
> return (struct pipe_query *)q;
> @@ -150,8 +150,8 @@ nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
> * initialized it to TRUE.
> */
> if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
> - q->offset += 16;
> - q->data += 16 / sizeof(*q->data);
> + q->offset += 32;
> + q->data += 32 / sizeof(*q->data);
> if (q->offset - q->base == NV50_QUERY_ALLOC_SPACE)
> nv50_query_allocate(nv50, q, NV50_QUERY_ALLOC_SPACE);
>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
prev parent reply other threads:[~2015-04-04 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-04 4:00 [PATCH] nv50: allocate more offset space for occlusion queries Ilia Mirkin
[not found] ` <1428120023-9598-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2015-04-04 12:50 ` Samuel Pitoiset [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=551FDE1A.1080703@gmail.com \
--to=samuel.pitoiset-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=mesa-stable-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.