Mesa (master): nvc0: treat all draws without color0 broadcast as MRT

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jan 12 17:19:27 UTC 2020


Module: Mesa
Branch: master
Commit: 201b88a93bb9d42a3baf349f83756df1d562da29
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=201b88a93bb9d42a3baf349f83756df1d562da29

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Jan 12 00:07:05 2020 -0500

nvc0: treat all draws without color0 broadcast as MRT

Per the semi-recently-released NVIDIA docs, when this bit is not
enabled, then the result for RT[0] will be used. So if e.g. only a
single RT is drawn to and it's not RT[2], the results will not be
visible. Fixes
GTF-GL45.gtf33.GL3Tests.explicit_attrib_location.explicit_attrib_location_pipeline
which was failing due to a frag shader outputting only to location=2.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index 2f235805436..128b94e1da5 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -440,7 +440,7 @@ nvc0_fp_gen_header(struct nvc0_program *fp, struct nv50_ir_prog_info *info)
 
    if (info->prop.fp.usesDiscard)
       fp->hdr[0] |= 0x8000;
-   if (info->prop.fp.numColourResults > 1)
+   if (!info->prop.fp.separateFragData)
       fp->hdr[0] |= 0x4000;
    if (info->io.sampleMask < PIPE_MAX_SHADER_OUTPUTS)
       fp->hdr[19] |= 0x1;




More information about the mesa-commit mailing list