[Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

Jose Fonseca jfonseca at vmware.com
Wed Nov 20 08:16:40 PST 2013

----- Original Message -----
> ----- Original Message -----
> > From: José Fonseca <jfonseca at vmware.com>
> > 
> > +            t->outputs[i] = ureg_writemask(t->outputs[i],
> What happens when the application decides to write to any component other
> than X? The application writemask combined with the one above will yield an
> empty one. Are we making sure that such instructions are skipped?

Ah, good point. I've seen state trackers emiting empty writemasks in the past (due to the need to emulate complex instructions with smaller ones), and the driver then (llvmpipe) handled it just fine.

We could improve tgsi_ureg to automatically do nothing when writemask, therefore taking care of this issue for all state trackers.  It seems cleaner than checking for a potential empty writemasks all over the place.


More information about the mesa-dev mailing list