From: Karol Herbst Date: Tue, 12 Dec 2017 20:02:37 +0000 (+0100) Subject: nv50/ir/nir: implement nir_intrinsic_load_uniform X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c257a0201d346e6685dcbb4d38f39779dba6238;p=mesa.git nv50/ir/nir: implement nir_intrinsic_load_uniform v2: use new getIndirect helper fixes symbols for 64 bit types v4: use smarter getIndirect helper simplify address calculation use loadFrom helper v8: don't require C++11 features Signed-off-by: Karol Herbst --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index a553e42e08a..dc8dbcfb48b 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -1532,6 +1532,16 @@ Converter::visit(nir_intrinsic_instr *insn) nir_intrinsic_op op = insn->intrinsic; switch (op) { + case nir_intrinsic_load_uniform: { + LValues &newDefs = convert(&insn->dest); + const DataType dType = getDType(insn); + Value *indirect; + uint32_t coffset = getIndirect(insn, 0, 0, indirect); + for (uint8_t i = 0; i < insn->num_components; ++i) { + loadFrom(FILE_MEMORY_CONST, 0, dType, newDefs[i], 16 * coffset, i, indirect); + } + break; + } default: ERROR("unknown nir_intrinsic_op %s\n", nir_intrinsic_infos[op].name); return false;