On Sat, 16 Jun 2012 21:27:14 -0700, Kenneth Graunke <[email protected]> wrote: > If alpha testing is enabled, we need to include alpha in the FB write. > Normally, this occurs as part of a color buffer write, but it's possible > to use alpha testing without any color buffers. The alpha_test flag > lets brw_fs.cpp know that the shader needs to send alpha anyway. > > Since the flag's only use occurs when nr_color_buffers == 0, we don't > need to set it in the general case; in fact, doing so will result in two > indentical shaders being compiled, wasting time and program cache space. > > This patch also renames it to "alpha_only", since it no longer > represents when alpha testing is enabled or disabled.
Hmm. I'm wondering if we shouldn't just always emit source 0 alpha, even for nr_color_buffers != 0. I think it's going to be needed for alpha-to-coverage as well. People setting gl_FragColor for nr_color_buffers = 0 are just being silly, right?
pgpr4kbtL5XOO.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
