All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier Galibert <galibert@pobox.com>
To: Paul Berry <stereotype441@gmail.com>
Cc: mesa-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH 1/5] intel gen4/5: fix GL_VERTEX_PROGRAM_TWO_SIDE.
Date: Sun, 29 Jul 2012 19:00:37 +0200	[thread overview]
Message-ID: <20120729170037.GA3431@dspnet.fr> (raw)
In-Reply-To: <CA+yLL66ZBWKp1yAGh8Cjz87W1zyG-q6m5qmkJVN52U3P1Mjo0g@mail.gmail.com>

On Tue, Jul 17, 2012 at 07:37:43AM -0700, Paul Berry wrote:
> If possible, I would still like to think of a way to address this situation
> that (a) doesn't require modifying both fragment shader back-ends and the
> SF program, and (b) helps all Mesa drivers, not just Intel Gen4-5.
> Especially because I suspect we may have bugs in Gen6-7 related to this
> situation. 

You don't :-) It's correctly handled in
gen6_sf_state.c::get_attr_override with similar semantics too.

> Would you be happy with one of the following two alternatives?
> 
> 1. In the GLSL front-end, if we detect that a vertex shader writes to
> gl_BackColor but not gl_FrontColor, then automatically insert
> "gl_FrontColor = 0;" into the shader.  This will guarantee that whenever
> gl_BackColor is written, gl_FrontColor is too.
> 
> 2. In the function brw_compute_vue_map(), assign a VUE slot for
> VERT_RESULT_COL0 whenever *either* VERT_RESULT_COL0 or VERT_RESULT_BFC0 is
> used.  This will guarantee that we always have a VUE slot available for
> front color, so we don't have to be as tricky in the FS and SF code.

With both methods the SF code is not really simplified.  Doing the mov
without testing would require writing to/reserving a slot for
gl_BackColor if gl_FrontColor is written to, which wouldn't be
acceptable.  And to write to/reserve a slot for the two of them if
gl_Color is read in any case.  Probably unacceptable.  So the need_*
stuff is going to stay in any case :/

So the only simplification would be in the fs/wm and I'm somewhat
afraid of having a vue slot that's not in outputs_written of the
previous stage.  They seem to be expected equivalent.

> This morning I'll try to ask some other Intel folks for their opinion on
> the subject.

Did they have an opinion?

Best,

  OG.

  reply	other threads:[~2012-07-29 17:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-30 18:50 [PATCH 0/5] First batch of gm45 clipping/interpolation fixes Olivier Galibert
2012-06-30 18:50 ` [PATCH 1/5] intel gen4/5: fix GL_VERTEX_PROGRAM_TWO_SIDE Olivier Galibert
2012-07-17  3:43   ` [Mesa-dev] " Paul Berry
2012-07-17  8:33     ` [Intel-gfx] " Olivier Galibert
2012-07-17  8:57     ` [Mesa-dev] " Olivier Galibert
2012-07-17 14:37       ` Paul Berry
2012-07-29 17:00         ` Olivier Galibert [this message]
2012-07-30 17:30           ` [Intel-gfx] " Eric Anholt
2012-07-30 19:55             ` [Mesa-dev] " Olivier Galibert
2012-07-31 15:28               ` [Intel-gfx] " Eric Anholt
2012-06-30 18:50 ` [PATCH 2/5] intel gen4-5: Compute the interpolation status for every variable in one place Olivier Galibert
2012-07-17  4:24   ` Paul Berry
2012-06-30 18:50 ` [PATCH 3/5] intel gen4-5: Correctly setup the parameters in the sf Olivier Galibert
2012-07-17 12:50   ` [Mesa-dev] " Paul Berry
2012-07-17 13:07     ` Paul Berry
2012-06-30 18:50 ` [PATCH 4/5] intel gen4-5: Correctly handle flat vs. non-flat in the clipper Olivier Galibert
2012-07-17 12:55   ` [Mesa-dev] " Paul Berry
2012-06-30 18:50 ` [PATCH 5/5] intel gen4-5: Make noperspective clipping work Olivier Galibert
2012-07-17 14:07   ` [Mesa-dev] " Paul Berry
2012-07-13  7:20 ` [Mesa-dev] [PATCH 0/5] First batch of gm45 clipping/interpolation fixes Olivier Galibert
2012-07-13 21:45   ` Kenneth Graunke
2012-07-14  9:21     ` Olivier Galibert
2012-07-17  2:33       ` Paul Berry
2012-07-17 14:42         ` [Intel-gfx] " Paul Berry

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=20120729170037.GA3431@dspnet.fr \
    --to=galibert@pobox.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mesa-dev@lists.freedesktop.org \
    --cc=stereotype441@gmail.com \
    /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.