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

Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Sat Apr  3 01:13:16 2021 -0400

nv50/ir: fake SV_THREAD_KILL support

If we say that there are no helper invocations, it's suboptimal but
allows ES 3.1 to chug along.

Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
Reviewed-by: Karol Herbst <kher...@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10162>

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp | 5 +++++
 src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index 406b0f709f6..1fe3dc7c3a9 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -1230,6 +1230,11 @@ NV50LoweringPreSSA::handleRDSV(Instruction *i)
                  off);
       break;
    }
+   case SV_THREAD_KILL:
+      // Not actually supported. But it's implementation-dependent, so we can
+      // always just say it's not a helper.
+      bld.mkMov(def, bld.loadImm(NULL, 0));
+      break;
    default:
       bld.mkFetch(i->getDef(0), i->dType,
                   FILE_SHADER_INPUT, addr, i->getIndirect(0, 0), NULL);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp
index 1b2f988247a..90081965e54 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp
@@ -261,6 +261,8 @@ TargetNV50::getSVAddress(DataFile shaderFile, const Symbol 
*sym) const
       return 0;
    case SV_SAMPLE_POS:
       return 0; /* sample position is handled differently */
+   case SV_THREAD_KILL:
+      return 0;
    default:
       return sysvalLocation[sym->reg.data.sv.sv];
    }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to