mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
i965/fs: Gen4-5: Setup discard masks for MRT alpha test
The same setup is required here as when the user-provided shader
explicitly uses KIL or discard.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit ca82ba90dd)
This commit is contained in:
parent
4f247c28e5
commit
56b0e3271a
2 changed files with 2 additions and 2 deletions
|
|
@ -2920,7 +2920,7 @@ fs_visitor::run()
|
|||
/* We handle discards by keeping track of the still-live pixels in f0.1.
|
||||
* Initialize it with the dispatched pixels.
|
||||
*/
|
||||
if (fp->UsesKill) {
|
||||
if (fp->UsesKill || c->key.alpha_test_func) {
|
||||
fs_inst *discard_init = emit(FS_OPCODE_MOV_DISPATCH_TO_FLAGS);
|
||||
discard_init->flag_subreg = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ fs_generator::generate_fb_write(fs_inst *inst)
|
|||
brw_set_mask_control(p, BRW_MASK_DISABLE);
|
||||
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
|
||||
|
||||
if (fp->UsesKill) {
|
||||
if (fp->UsesKill || c->key.alpha_test_func) {
|
||||
struct brw_reg pixel_mask;
|
||||
|
||||
if (brw->gen >= 6)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue