search for: defexist

Displaying 20 results from an estimated 39 matches for "defexist".

Did you mean: defexists
2016 Sep 30
2
[PATCH v2] nv50/ir: constant fold OP_SPLIT
...peOfSize(size / 2, isFloatType(i->dType), + isSignedType(i->dType)); + if (likely(type != TYPE_NONE)) { + uint64_t val = imm0.reg.data.u64; + uint16_t shift = size * 8; + bld.setPosition(i, false); + for (int8_t d = 0; i->defExists(d); ++d) { + bld.mkMov(i->getDef(d), bld.mkImm(val & ((1 << shift) - 1)), type); + val >>= shift; + } + delete_Instruction(prog, i); + } + } + break; case OP_MUL: if (i->dType == TYPE_F32) tryCollapseChainedM...
2016 Sep 30
2
[PATCH] nv50/ir: constant fold OP_SPLIT
...= typeSizeOf(i->dType); > >> + if (type != TYPE_NONE) { >> + bld.mkMov(i->getDef(0), bld.mkImm(imm0.reg.data.u64 >> shift), type); >> + bld.mkMov(i->getDef(1), bld.mkImm(imm0.reg.data.u64), type); > u64 val = ...u64; > for (d = 0; i->defExists(d); ++d) { > bld.mkMov(i->getDef(d), bld.mkImm(val & ((1 << shift) - 1)); > val >>= shift; > } > > I think this will account for every case, and with a lot less > special-casing. What do you think? Well with this you'd not set the new type right: bld...
2014 May 03
0
[PATCH] nv50/ir: allow load propagation when flags are defined
...0644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp @@ -275,9 +275,10 @@ TargetNV50::insnCanLoad(const Instruction *i, int s, return false; // NOTE: don't rely on flagsDef - for (int d = 0; i->defExists(d); ++d) - if (i->def(d).getFile() == FILE_FLAGS) - return false; + if (sf == FILE_IMMEDIATE) + for (int d = 0; i->defExists(d); ++d) + if (i->def(d).getFile() == FILE_FLAGS) + return false; unsigned mode = 0; -- 1.8.3.2
2015 Jan 11
6
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
...k constraints on short MAD if (info.srcNr >= 2 && i->srcExists(2)) { - if (i->saturate || i->src(2).mod) - return 8; - if ((i->src(0).mod ^ i->src(1).mod) || - (i->src(0).mod | i->src(1).mod).abs()) - return 8; if (!i->defExists(0) || i->def(0).rep()->reg.data.id != i->src(2).rep()->reg.data.id) return 8; 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 48f996b..f4dedd7 100644 --- a/src/gallium/driv...
2019 Oct 14
1
[PATCH] gm107/ir: fix loading z offset for layered 3d image bindings
...// op at all, and a "pred2d" which indicates that, in case of doing the + // surface op, we have to create a 2d and 3d version, conditioned on pred2d. + TexInstruction *su2d = NULL; + if (pred2d) { + su2d = cloneForward(func, su)->asTex(); + for (unsigned i = 0; su->defExists(i); ++i) + su2d->setDef(i, bld.getSSA()); + su2d->moveSources(dim + 1, -1); + su2d->tex.target = nv50_ir::TEX_TARGET_2D; + } + if (pred2d && pred) { + Instruction *pred3d = bld.mkOp2(OP_AND, TYPE_U8, + bld.getSSA(1, F...
2016 Sep 27
2
[PATCH] nv50/ir: constant fold OP_SPLIT
Split the source immediate value into two new values and create OP_MOV instructions the two newly created values. Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- .../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
2016 Mar 14
2
[RFC mesa] nouveau: Add support for OpenCL global memory buffers
...= OP_VFETCH; +#if 0 } else if (i->src(0).getFile() == FILE_MEMORY_GLOBAL) { Value *ind = i->getIndirect(0, 1); Value *ptr = loadResInfo64(ind, i->getSrc(0)->reg.fileIndex * 16); @@ -2126,6 +2127,7 @@ NVC0LoweringPass::visit(Instruction *i) if (i->defExists(0)) { bld.mkMov(i->getDef(0), bld.mkImm(0)); } +#endif } break; case OP_ATOM: -- 2.7.2
2015 Jan 11
1
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
...amp;& i->srcExists(2)) { >> - if (i->saturate || i->src(2).mod) >> - return 8; >> - if ((i->src(0).mod ^ i->src(1).mod) || >> - (i->src(0).mod | i->src(1).mod).abs()) >> - return 8; >> if (!i->defExists(0) || >> i->def(0).rep()->reg.data.id != i->src(2).rep()->reg.data.id) >> return 8; >> 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 48f996b....
2016 Mar 14
2
[RFC mesa] nouveau: Add support for OpenCL global memory buffers
...(0).getFile() == FILE_MEMORY_GLOBAL) { >> Value *ind = i->getIndirect(0, 1); >> Value *ptr = loadResInfo64(ind, i->getSrc(0)->reg.fileIndex * >> 16); >> @@ -2126,6 +2127,7 @@ NVC0LoweringPass::visit(Instruction *i) >> if (i->defExists(0)) { >> bld.mkMov(i->getDef(0), bld.mkImm(0)); >> } >> +#endif >> } >> break; >> case OP_ATOM: >> -- >> 2.7.2 >> >> >
2017 Dec 20
2
[PATCH] gm107/ir: use lane 0 for manual textureGrad handling
....target.isShadow()) + tex->setSrc(array + dim, shadow); + } for (c = 0; c < dim; ++c) tex->setSrc(c + array, src[c]); + // broadcast results from lane 0 to all lanes + if (l != 0) { + Value *lane = bld.mkImm(l); + for (c = 0; i->defExists(c); ++c) + bld.mkOp3(OP_SHFL, TYPE_F32, tex->getDef(c), tex->getDef(c), lane, quad); + } bld.mkOp(OP_QUADPOP, TYPE_NONE, NULL); // save results -- 2.13.6
2015 Jan 23
3
[PATCH 1/2] nv50/ir: Add support for MAD short+IMM notation
...k constraints on short MAD if (info.srcNr >= 2 && i->srcExists(2)) { - if (i->saturate || i->src(2).mod) - return 8; - if ((i->src(0).mod ^ i->src(1).mod) || - (i->src(0).mod | i->src(1).mod).abs()) - return 8; if (!i->defExists(0) || i->def(0).rep()->reg.data.id != i->src(2).rep()->reg.data.id) return 8; 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 48f996b..178a167 100644 --- a/src/gallium/driv...
2016 Mar 17
4
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
...) } i->setIndirect(0, 1, NULL); i->setIndirect(0, 0, ptr); + i->getSrc(0)->reg.file = FILE_MEMORY_GLOBAL; bld.mkCmp(OP_SET, CC_GT, TYPE_U32, pred, TYPE_U32, offset, length); i->setPredicate(CC_NOT_P, pred); if (i->defExists(0)) { @@ -1987,7 +1989,7 @@ NVC0LoweringPass::visit(Instruction *i) break; case OP_ATOM: { - const bool cctl = i->src(0).getFile() == FILE_MEMORY_GLOBAL; + const bool cctl = i->src(0).getFile() == FILE_MEMORY_BUFFER; handleATOM(i); handleCasExch(i, cctl...
2016 Sep 28
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...S8; > + } shift = typeSizeOf(i->dType); > + if (type != TYPE_NONE) { > + bld.mkMov(i->getDef(0), bld.mkImm(imm0.reg.data.u64 >> shift), type); > + bld.mkMov(i->getDef(1), bld.mkImm(imm0.reg.data.u64), type); u64 val = ...u64; for (d = 0; i->defExists(d); ++d) { bld.mkMov(i->getDef(d), bld.mkImm(val & ((1 << shift) - 1)); val >>= shift; } I think this will account for every case, and with a lot less special-casing. What do you think? > + delete_Instruction(prog, i); > + } > + } > + break; &g...
2016 Sep 30
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...t; + if (type != TYPE_NONE) { >>> + bld.mkMov(i->getDef(0), bld.mkImm(imm0.reg.data.u64 >> shift), >>> type); >>> + bld.mkMov(i->getDef(1), bld.mkImm(imm0.reg.data.u64), type); >> >> u64 val = ...u64; >> for (d = 0; i->defExists(d); ++d) { >> bld.mkMov(i->getDef(d), bld.mkImm(val & ((1 << shift) - 1)); >> val >>= shift; >> } >> >> I think this will account for every case, and with a lot less >> special-casing. What do you think? > > > Well with this you...
2016 Sep 30
0
[PATCH v2] nv50/ir: constant fold OP_SPLIT
...here... Why do you need to compute type at all? Why not just reuse i->dType? > + if (likely(type != TYPE_NONE)) { > + uint64_t val = imm0.reg.data.u64; > + uint16_t shift = size * 8; > + bld.setPosition(i, false); > + for (int8_t d = 0; i->defExists(d); ++d) { > + bld.mkMov(i->getDef(d), bld.mkImm(val & ((1 << shift) - 1)), type); 1ULL > + val >>= shift; > + } > + delete_Instruction(prog, i); > + } > + } > + break; > case OP_MUL: > if (i-...
2014 Jul 05
0
[PATCH] nvc0: do quadops on the right texture coordinates for TXD
...32,7 +733,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i) // texture bld.insert(tex = cloneForward(func, i)); for (c = 0; c < dim; ++c) - tex->setSrc(c, crd[c]); + tex->setSrc(c + array, crd[c]); // save results for (c = 0; i->defExists(c); ++c) { Instruction *mov; -- 1.8.5.5
2015 Jan 11
0
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
...if (info.srcNr >= 2 && i->srcExists(2)) { > - if (i->saturate || i->src(2).mod) > - return 8; > - if ((i->src(0).mod ^ i->src(1).mod) || > - (i->src(0).mod | i->src(1).mod).abs()) > - return 8; > if (!i->defExists(0) || > i->def(0).rep()->reg.data.id != i->src(2).rep()->reg.data.id) > return 8; > 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 48f996b..f4dedd7 100644 &g...
2016 Mar 14
2
[RFC mesa] nouveau: Add support for OpenCL global memory buffers
...gt;>>> Value *ind = i->getIndirect(0, 1); >>>> Value *ptr = loadResInfo64(ind, i->getSrc(0)->reg.fileIndex * >>>> 16); >>>> @@ -2126,6 +2127,7 @@ NVC0LoweringPass::visit(Instruction *i) >>>> if (i->defExists(0)) { >>>> bld.mkMov(i->getDef(0), bld.mkImm(0)); >>>> } >>>> +#endif >>>> } >>>> break; >>>> case OP_ATOM: >>>> -- >>>> 2.7.2 >>>> >>&...
2016 Apr 08
2
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
...ULL); >> i->setIndirect(0, 0, ptr); >> + i->getSrc(0)->reg.file = FILE_MEMORY_GLOBAL; >> bld.mkCmp(OP_SET, CC_GT, TYPE_U32, pred, TYPE_U32, offset, length); >> i->setPredicate(CC_NOT_P, pred); >> if (i->defExists(0)) { >> @@ -1987,7 +1989,7 @@ NVC0LoweringPass::visit(Instruction *i) >> break; >> case OP_ATOM: >> { >> - const bool cctl = i->src(0).getFile() == FILE_MEMORY_GLOBAL; >> + const bool cctl = i->src(0).getFile() == FILE_MEMORY_B...
2016 Mar 14
0
[RFC mesa] nouveau: Add support for OpenCL global memory buffers
...} else if (i->src(0).getFile() == FILE_MEMORY_GLOBAL) { > Value *ind = i->getIndirect(0, 1); > Value *ptr = loadResInfo64(ind, i->getSrc(0)->reg.fileIndex * > 16); > @@ -2126,6 +2127,7 @@ NVC0LoweringPass::visit(Instruction *i) > if (i->defExists(0)) { > bld.mkMov(i->getDef(0), bld.mkImm(0)); > } > +#endif > } > break; > case OP_ATOM: > -- > 2.7.2 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/arc...