diff options
author | Karol Herbst <[email protected]> | 2017-12-12 21:02:37 +0100 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-03-17 10:33:28 +0100 |
commit | 8c257a0201d346e6685dcbb4d38f39779dba6238 (patch) | |
tree | 88288c9096e1027992c7d61f14f25659e89c4ed9 /src/gallium/drivers | |
parent | 6513c675ad31d192265a8286d712e8ae81c9f305 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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; |