public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Olivier Galibert <galibert@pobox.com>,
	Paul Berry <stereotype441@gmail.com>
Cc: mesa-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/5] intel gen4/5: fix GL_VERTEX_PROGRAM_TWO_SIDE.
Date: Mon, 30 Jul 2012 10:30:57 -0700	[thread overview]
Message-ID: <87mx2hxijy.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <20120729170037.GA3431@dspnet.fr>


[-- Attachment #1.1: Type: text/plain, Size: 1729 bytes --]

Olivier Galibert <galibert@pobox.com> writes:

> 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 :/

I'm perfectly fine with the VUE containing slots for both when the app
has gone out of its way to ask for deprecated two-sided color
rendering.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

  reply	other threads:[~2012-07-30 17:30 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         ` [Mesa-dev] " Olivier Galibert
2012-07-30 17:30           ` Eric Anholt [this message]
2012-07-30 19:55             ` 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=87mx2hxijy.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox