diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2021-01-19 05:17:45 -0500 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2021-01-21 15:55:34 -0500 |
commit | 245a696741d2a4cd5f2aade38c2194e3030d659b (patch) | |
tree | f8aba9f001dea55a03995a0d703fdbf86a7df37f /src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | |
parent | 0773cd33c2bd14605eee471dd0dcc5306dd41cd4 (diff) |
nvc0/ir: add fixup to deal with interpolateAtSample with non-MSAA
The spec calls to always use sample 0 in this case, whereas we can do
undefined things for invalid sample id's in the MSAA case.
Fixes
dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.non_multisample_buffer.sample_n_*
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8574>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index e651d7fdcb0..8116fb58f7d 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -1213,7 +1213,16 @@ void gk110_selpFlip(const FixupEntry *entry, uint32_t *code, const FixupData& data) { int loc = entry->loc; - if (data.force_persample_interp) + bool val = false; + switch (entry->ipa) { + case 0: + val = data.force_persample_interp; + break; + case 1: + val = data.msaa; + break; + } + if (val) code[loc + 1] |= 1 << 13; else code[loc + 1] &= ~(1 << 13); @@ -1226,8 +1235,8 @@ void CodeEmitterGK110::emitSELP(const Instruction *i) if (i->src(2).mod & Modifier(NV50_IR_MOD_NOT)) code[1] |= 1 << 13; - if (i->subOp == 1) { - addInterp(0, 0, gk110_selpFlip); + if (i->subOp >= 1) { + addInterp(i->subOp - 1, 0, gk110_selpFlip); } } |