From: Tobias Klausmann <tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [Mesa-dev] [PATCH 2/2] nv30: fix clip plane uploads and enable changes
Date: Sun, 24 May 2015 17:52:22 +0200 [thread overview]
Message-ID: <5561F3B6.2080903@mni.thm.de> (raw)
In-Reply-To: <CAKb7Uvhkt7OGxbE3hkEkxUMgH7LkmJsa73xp5AxLYc8PN=9e3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 24.05.2015 17:42, Ilia Mirkin wrote:
> On Sun, May 24, 2015 at 10:56 AM, Tobias Klausmann
> <tobias.johannes.klausmann@mni.thm.de> wrote:
>>
>> On 24.05.2015 16:15, Pierre Moreau wrote:
>>>> On 24 May 2015, at 16:03, Tobias Klausmann
>>>> <tobias.johannes.klausmann@mni.thm.de> wrote:
>>>>
>>>>
>>>>
>>>> On 24.05.2015 10:38, Samuel Pitoiset wrote:
>>>>>
>>>>> On 05/24/2015 06:58 AM, Ilia Mirkin wrote:
>>>>>> nv30_validate_clip depends on the rasterizer state. Also we should
>>>>>> upload all the new clip planes on change since next time the plane data
>>>>>> won't have changed, but the enables might.
>>>>>>
>>>>>> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
>>>>>> ---
>>>>>> src/gallium/drivers/nouveau/nv30/nv30_state_validate.c | 16
>>>>>> +++++++---------
>>>>>> 1 file changed, 7 insertions(+), 9 deletions(-)
>>>>>>
>>>>>> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
>>>>>> b/src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
>>>>>> index 86ac4f7..a954dcc 100644
>>>>>> --- a/src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
>>>>>> +++ b/src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
>>>>>> @@ -272,15 +272,13 @@ nv30_validate_clip(struct nv30_context *nv30)
>>>>>> uint32_t clpd_enable = 0;
>>>>>> for (i = 0; i < 6; i++) {
>>>>>> - if (nv30->rast->pipe.clip_plane_enable & (1 << i)) {
>>>>>> - if (nv30->dirty & NV30_NEW_CLIP) {
>>>>>> - BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 5);
>>>>>> - PUSH_DATA (push, i);
>>>>>> - PUSH_DATAp(push, nv30->clip.ucp[i], 4);
>>>>>> - }
>>>>>> -
>>>>>> - clpd_enable |= 1 << (1 + 4*i);
>>>>>> + if (nv30->dirty & NV30_NEW_CLIP) {
>>>>>> + BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 5);
>>>>>> + PUSH_DATA (push, i);
>>>>>> + PUSH_DATAp(push, nv30->clip.ucp[i], 4);
>>>>>> }
>>>>>> + if (nv30->rast->pipe.clip_plane_enable & (1 << i))
>>>>>> + clpd_enable |= 2 << (4*i);
>>>>> Can you explain why did you change this line?
>>>> This does bother me as well :)
>>> It should be the same as before but using one less addition: shifting 1 by
>>> 5 or 2 by 4 is similar.
>>
>> *dang* you are right. maybe we should change those lines along in nv50 and
>> nvc0, save the additional addition :-)
> What lines?
>
>> With this sorted out, series is:
> Not sure what you mean here... what do you want me to sort out? The 2
> back into a +1? I was just looking at the defines like
Nah, i meant that it _is_ allright the way you did it and that we should
change similar lines for clip in nv50/nvc0 the way you did here
>
> #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE1 0x00000020
>
> and the 2 << 4i seemed more obviously correct. Although they're
> obviously identical.
>
>> Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
>>
>>
>>>>>> }
>>>>>> BEGIN_NV04(push, NV30_3D(VP_CLIP_PLANES_ENABLE), 1);
>>>>>> @@ -389,7 +387,7 @@ static struct state_validate hwtnl_validate_list[]
>>>>>> = {
>>>>>> { nv30_validate_stipple, NV30_NEW_STIPPLE },
>>>>>> { nv30_validate_scissor, NV30_NEW_SCISSOR |
>>>>>> NV30_NEW_RASTERIZER },
>>>>>> { nv30_validate_viewport, NV30_NEW_VIEWPORT },
>>>>>> - { nv30_validate_clip, NV30_NEW_CLIP },
>>>>>> + { nv30_validate_clip, NV30_NEW_CLIP | NV30_NEW_RASTERIZER
>>>>>> },
>>>>>> { nv30_fragprog_validate, NV30_NEW_FRAGPROG |
>>>>>> NV30_NEW_FRAGCONST },
>>>>>> { nv30_vertprog_validate, NV30_NEW_VERTPROG |
>>>>>> NV30_NEW_VERTCONST |
>>>>>> NV30_NEW_FRAGPROG |
>>>>>> NV30_NEW_RASTERIZER },
>>>>> _______________________________________________
>>>>> Nouveau mailing list
>>>>> Nouveau@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/nouveau
>>>> _______________________________________________
>>>> Nouveau mailing list
>>>> Nouveau@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/nouveau
>>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-05-24 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-24 4:58 [PATCH 1/2] nv30: avoid doing extra work on clear and hitting unexpected states Ilia Mirkin
2015-05-24 4:58 ` [PATCH 2/2] nv30: fix clip plane uploads and enable changes Ilia Mirkin
[not found] ` <1432443489-1067-2-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2015-05-24 8:38 ` [Mesa-dev] " Samuel Pitoiset
[not found] ` <55618E16.6090700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-24 14:03 ` Tobias Klausmann
[not found] ` <5561DA2D.50202-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-24 14:15 ` Pierre Moreau
[not found] ` <ED051C04-3BF9-4299-AF71-AAED9DE8DF9B-GANU6spQydw@public.gmane.org>
2015-05-24 14:56 ` Tobias Klausmann
[not found] ` <5561E6AF.9050700-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-24 15:42 ` Ilia Mirkin
[not found] ` <CAKb7Uvhkt7OGxbE3hkEkxUMgH7LkmJsa73xp5AxLYc8PN=9e3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-24 15:52 ` Tobias Klausmann [this message]
[not found] ` <5561F3B6.2080903-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-24 15:55 ` Ilia Mirkin
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=5561F3B6.2080903@mni.thm.de \
--to=tobias.johannes.klausmann-aqjdnwhu20eelga04laivw@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@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.