nouveau/nir: Implement load_global_constant
authorJason Ekstrand <jason@jlekstrand.net>
Sat, 29 Aug 2020 06:01:48 +0000 (01:01 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Sep 2020 20:50:04 +0000 (20:50 +0000)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp

index 08bbaaed5df84d556232e7abf4484fa93338cfac..b9a82a037e88a2104ca93706a3bd8afbb886b788 100644 (file)
@@ -355,6 +355,7 @@ Converter::getFile(nir_intrinsic_op op)
    switch (op) {
    case nir_intrinsic_load_global:
    case nir_intrinsic_store_global:
+   case nir_intrinsic_load_global_constant:
       return FILE_MEMORY_GLOBAL;
    case nir_intrinsic_load_scratch:
    case nir_intrinsic_store_scratch:
@@ -2328,7 +2329,8 @@ Converter::visit(nir_intrinsic_instr *insn)
       mkOp1(OP_RDSV, dType, newDefs[1], mkSysVal(SV_CLOCK, 0))->fixed = 1;
       break;
    }
-   case nir_intrinsic_load_global: {
+   case nir_intrinsic_load_global:
+   case nir_intrinsic_load_global_constant: {
       const DataType dType = getDType(insn);
       LValues &newDefs = convert(&insn->dest);
       Value *indirectOffset;