On Tue, 08 Nov 2011 19:21:59 -0800, Kenneth Graunke <kenn...@whitecape.org> 
wrote:
> On 11/04/2011 03:01 PM, Eric Anholt wrote:
> > Before, I was tracking the ir_variable * found for gl_FragColor or
> > gl_FragData[].  Instead, when visiting those variables, set up an
> > array of per-render-target fs_regs to copy the output data from.  This
> > cleans up the color emit path, while making handling of multiple
> > user-defined out variables easier.
> > 
> > Note that brw_type_for_base_type() now returns a sensible value for
> > arrays.  This probably obsoletes a bunch of type overrides we have
> > laying around.

> [snip]
> > @@ -1988,13 +1999,12 @@ fs_visitor::emit_fb_writes()
> >     }
> >  
> >     if (c->key.nr_color_regions == 0) {
> > -      if (c->key.alpha_test && (this->frag_color || this->frag_data)) {
> > +      if (c->key.alpha_test) {
> >      /* If the alpha test is enabled but there's no color buffer,
> >       * we still need to send alpha out the pipeline to our null
> >       * renderbuffer.
> >       */
> > -    color.reg_offset += 3;
> > -    emit_color_write(3, color_mrf, color);
> > +    emit_color_write(0, 3, color_mrf);
> >        }
> 
> I'm a little concerned about removing reg_offset += 3.  This seems like
> a change in behavior (assigning all four instead of just alpha).  Was it
> wrong before/is this a bug fix?  Or, is this just simpler code (since
> the other three channels are ignored anyway)?

Even simpler explanation: The reg_offset increment by index value got
moved into emit_color_write() -- note a similar change above at the
other emit_color_write().

Attachment: pgp53ZewyleLw.pgp
Description: PGP signature

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

Reply via email to