Skip to contentSkip to conversation

nvc0: always emit a full shader colormask

PATCH New Ilia Mirkin 1 participant 1 message Sep 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvc0: always emit a full shader colormask

Indications are that if the colormask indicates a single bit set on fermi, that value will always be read from $r0 instead of a potentially higher register (if e.g. green is set). Not to upset the counting logic, always set the header up with a full color mask for each RT.

Fixes the following piglit:
fbo-stencil blit GL_DEPTH32F_STENCIL8

---

Needs a piglit run on both fermi and kepler just to make sure.

 src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/gallium/drivers/nouveau/nvc0/nvc0_program.c +1 -1
index 12f1bb7..a168dd6 100644
@@ -449,7 +449,7 @@ nvc0_fp_gen_header(struct nvc0_program *fp, struct nv50_ir_prog_info *info)
 
    for (i = 0; i < info->numOutputs; ++i) {
       if (info->out[i].sn == TGSI_SEMANTIC_COLOR)
-         fp->hdr[18] |= info->out[i].mask << info->out[i].slot[0];
+         fp->hdr[18] |= 0xf << info->out[i].slot[0];
    }
 
    fp->fp.early_z = info->prop.fp.earlyFragTests;
Signature · 6 lines
2.4.6

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev