All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	"Marek Olšák" <maraeo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC PATCH 00/11] Implement ARB_cull_distance
Date: Wed, 8 Jul 2015 22:04:15 +0200	[thread overview]
Message-ID: <559D823F.7070309@mni.thm.de> (raw)
In-Reply-To: <CAKb7Uvj3CP3wBA1mWLhTdt-9RJRemHKYwqezOKD=GTw6zFOsbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>



On 25.05.2015 17:07, Ilia Mirkin wrote:
> On Mon, May 25, 2015 at 9:40 AM, Tobias Klausmann
> <tobias.johannes.klausmann@mni.thm.de> wrote:
>> On 25.05.2015 07:17, Dave Airlie wrote:
>>> On 25 May 2015 at 08:11, Marek Olšák <maraeo@gmail.com> wrote:
>>>> It's the same on Radeon. There are 2x ClipOrCullDistance output
>>>> vectors and a mask saying it should clip or cull or do nothing.
>>>>
>>>> Marek
>>>>
>>> My thinking was gallium should have a single semantic and a mask in
>>> the shader definition maybe.
>>>
>>> though it doesn't solve the does nvidia do the right thing with
>>> cull[0] and clip[0], and what is the right thing.
>>>
>>> Dave.
>>
>> I'm still convinced that both clip[0] and cull[0] should be possible. Plus i
>> have written a shader_test for this a while ago which you pushed to piglit
>> (fs-cull-and-clip-distance-different.shader_test). If i remember right
>> nvidia passed that test just fine.
> My take (and note that I last read the extension many months ago) is
> that you're supposed to figure out the max gl_ClipDistance[] written,
> and then write all your cull distances above that. So if you, e.g.,
> have something like
>
> gl_ClipDistance[5] = 1;
> gl_CullDistance[0] = 1;
>
> Then it would decide that there are 6 clip distances (or if there's an
> explicit out float gl_ClipDistance[n], then use that), and 1 cull
> distance. In the TGSI, I'm thinking this might look approximately like
>
> PROPERTY CULL_MASK (1<<6)
> DCL OUT[0], CLIPDIST[0]
> DCL OUT[1], CLIPDIST[1]
> MOV OUT[1].y, 1 (clip distance[5])
> MOV OUT[1].z, 1 (cull distance[0])
>
> Then basically you'd have
>
> (rast->clip_enable & shader->actual_clip_writes_mask) | cull_mask =
> the enabled distances
> cull_mask = cull mask
>
> This would work *very* well for nouveau, not sure how suitable it is
> for other hardware.
>
> Cheers,
>
>    -ilia
I wonder where this step should be implemented after all. It was brought 
up that llvmpipe already supports cull_distance (it does!), so maybe we 
should implement this in the drivers to evade llvmpipe breakage. Any 
suggestions appreciated :)

Tobias
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2015-07-08 20:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-24 17:57 [RFC PATCH 00/11] Implement ARB_cull_distance Tobias Klausmann
2015-05-24 17:58 ` [PATCH 03/11] mesa/prog: Add varyings for arb_cull_distance Tobias Klausmann
2015-05-24 17:58 ` [PATCH 04/11] mesa/st: add support for GL_ARB_cull_distance Tobias Klausmann
2015-05-24 18:12   ` Marek Olšák
     [not found]     ` <CAAxE2A5TdLJaNfeoHE7Rrf-R80KTRbj_dtVN-cTd3K-_BfcPGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-24 19:33       ` [Mesa-dev] " Tobias Klausmann
2015-05-24 17:58 ` [PATCH 09/11] gallium: add support for arb_cull_distance Tobias Klausmann
2015-05-25 18:36   ` Roland Scheidegger
2015-05-25 18:56     ` Tobias Klausmann
     [not found] ` <1432490289-29353-1-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-24 17:57   ` [PATCH 01/11] glapi: add GL_ARB_cull_distance Tobias Klausmann
2015-05-24 17:58   ` [PATCH 02/11] mesa/main: add support for GL_ARB_cull_distance Tobias Klausmann
2015-05-24 18:11     ` [Nouveau] " Ilia Mirkin
     [not found]       ` <CAKb7Uvj=Q38BPUqyaUAwFfptMC4BV2p3fXLrOGak1+kwD4LTBQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-24 19:33         ` Tobias Klausmann
2015-05-24 17:58   ` [PATCH 05/11] glsl: Add a helper to see if an array was unsize in the shader Tobias Klausmann
2015-05-24 17:58   ` [PATCH 06/11] glsl: lower cull_distance into cull_distance_mesa Tobias Klausmann
2015-05-24 18:09     ` Marek Olšák
2015-05-24 17:58   ` [PATCH 07/11] glsl: Add arb_cull_distance support Tobias Klausmann
2015-05-24 22:34     ` Timothy Arceri
     [not found]       ` <1432506893.11443.2.camel-/E1597aS9LT0CCvOHzKKcA@public.gmane.org>
2015-05-24 22:46         ` [Mesa-dev] " Tobias Klausmann
2015-05-24 23:19           ` Timothy Arceri
2015-05-24 17:58   ` [PATCH 08/11] i965: rename UsesClipDistanceOut to UsesClipCullDistanceOut Tobias Klausmann
2015-05-24 17:58   ` [PATCH 10/11] nouveau/codegen: sort in galliums cull_distance semantic into the drivers bitmask Tobias Klausmann
2015-05-24 19:38     ` Ilia Mirkin
2015-05-24 17:58   ` [PATCH 11/11] nouveau/nvc0: implement cull_distance as a special form of clip distance Tobias Klausmann
2015-05-24 18:25   ` [RFC PATCH 00/11] Implement ARB_cull_distance Ilia Mirkin
     [not found]     ` <CAKb7UvjqEq9M639ZXhFeLqPjEVcP5Zfqc_Df7yjBA34ww70jMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-24 19:30       ` Tobias Klausmann
     [not found]         ` <556226F1.8020502-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-24 19:36           ` Ilia Mirkin
     [not found]             ` <CAKb7Uvgby-ycm5rQJWNJmC-4hkB2L9msgOiGh0YXNTBj+2-yaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-24 19:56               ` Tobias Klausmann
     [not found]                 ` <55622D00.4000308-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-24 22:11                   ` Marek Olšák
     [not found]                     ` <CAAxE2A4Zc3G+Rw9VcaAcXj24RJvZsBY1hW6RDA=Mt+aO6s2nKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-25  5:17                       ` Dave Airlie
     [not found]                         ` <CAPM=9tzeBhg-srEZgud4p3AUx59GAA7ogastm7Jy8erq1-0zzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-25 13:40                           ` Tobias Klausmann
     [not found]                             ` <5563264B.4010008-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-25 15:07                               ` Ilia Mirkin
     [not found]                                 ` <CAKb7Uvj3CP3wBA1mWLhTdt-9RJRemHKYwqezOKD=GTw6zFOsbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 16:28                                   ` Marek Olšák
     [not found]                                     ` <CAAxE2A6=9rK3XuJTexcg-dj0F_NWXHisg9OMv99mMvZ-4E2nVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 19:05                                       ` Tobias Klausmann
     [not found]                                         ` <55661597.30809-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-05-27 22:51                                           ` Marek Olšák
     [not found]                                             ` <CAAxE2A78arFZdv1caKK_viR+AYydCyD45ENmTzw3M3cfLqLzhg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 23:02                                               ` Ilia Mirkin
2015-07-08 20:04                                   ` Tobias Klausmann [this message]
     [not found]                                     ` <559D823F.7070309-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 20:06                                       ` Ilia Mirkin
     [not found]                                         ` <CAKb7Uvj8qEKOZGap9H72cWMR8PwD_j15Fjxiew3MQR33ZsZ6Ww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-09  0:35                                           ` Marek Olšák

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=559D823F.7070309@mni.thm.de \
    --to=tobias.johannes.klausmann-aqjdnwhu20eelga04laivw@public.gmane.org \
    --cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
    --cc=maraeo-Re5JQEeQqe8AvxtiuMwx3w@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.