mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 23:28:06 +02:00
nv50/ir: saturate depth writes
Apparently there's no post-FS clamping logic, so we have to do this by hand. The depth will never be outside of the 0..1 range, even on floating point zeta buffers, so this should be safe. Fixes dEQP-GLES3.functional.fbo.depth.*clamp.* which tests writing invalid values on various zeta buffer formats. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
6262d6125a
commit
6711f159d9
1 changed files with 4 additions and 1 deletions
|
|
@ -3536,8 +3536,11 @@ Converter::exportOutputs()
|
|||
Symbol *sym = mkSymbol(FILE_SHADER_OUTPUT, 0, TYPE_F32,
|
||||
info->out[i].slot[c] * 4);
|
||||
Value *val = oData.load(sub.cur->values, i, c, NULL);
|
||||
if (val)
|
||||
if (val) {
|
||||
if (info->out[i].sn == TGSI_SEMANTIC_POSITION)
|
||||
mkOp1(OP_SAT, TYPE_F32, val, val);
|
||||
mkStore(OP_EXPORT, TYPE_F32, sym, NULL, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue