search for: file_immedi

Displaying 20 results from an estimated 32 matches for "file_immedi".

2015 Jan 23
3
[PATCH 1/2] nv50/ir: Add support for MAD short+IMM notation
...nv50.cpp index 2077388..b1e7409 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -939,9 +939,20 @@ CodeEmitterNV50::emitFMAD(const Instruction *i) code[0] = 0xe0000000; + if (i->src(1).getFile() == FILE_IMMEDIATE) { + code[1] = 0; + emitForm_IMM(i); + code[0] |= neg_mul << 15; + code[0] |= neg_add << 22; + if (i->saturate) + code[0] |= 1 << 8; + } else if (i->encSize == 4) { emitForm_MUL(i); - assert(!neg_mul && !neg_add);...
2015 Jan 11
6
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
...nv50.cpp index 2077388..b1e7409 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -939,9 +939,20 @@ CodeEmitterNV50::emitFMAD(const Instruction *i) code[0] = 0xe0000000; + if (i->src(1).getFile() == FILE_IMMEDIATE) { + code[1] = 0; + emitForm_IMM(i); + code[0] |= neg_mul << 15; + code[0] |= neg_add << 22; + if (i->saturate) + code[0] |= 1 << 8; + } else if (i->encSize == 4) { emitForm_MUL(i); - assert(!neg_mul && !neg_add);...
2015 Jan 13
3
nv50/ir: Implement short notation for MAD V2
V2: clarify code, commit msgs, add comments. Drop code to was supposed to make register assignment prefer SDST == SRC2 (patch 2) for now, because it didn't quite do what I intended.
2015 Feb 06
2
[PATCH 1/3] nv50/ir: Add support for MAD 4-byte opcode
Add emission rules for negative and saturate flags for MAD 4-byte opcodes, and get rid of some of the constraints. Obviously tested with a wide variety of shaders. V2: Document MAD as supported short form V3: Split up IMM from short-form modifiers Signed-off-by: Roy Spliet <rspliet at eclipso.eu> --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 10 ++++------
2017 Aug 12
3
[PATCH] nvc0/ir: propagate immediates to CALL input MOVs
On using builtin functions we have to move the input to registers $0 and $1, if one of the input value is an immediate, we fail to propagate the immediate: ... mov u32 $r477 0x00000003 (0) ... mov u32 $r0 %r473 (0) mov u32 $r1 $r477 (0) call abs BUILTIN:0 (0) mov u32 %r495 $r1 (0) ... With this patch the immediate is propagated, potentially causing the first MOV to be superfluous, which we'd
2017 Aug 13
1
[PATCH v2] nvc0/ir: propagate immediates to CALL input MOVs
...Instruction *ld = i->getSrc(s)->getInsn(); + assert(ld->getSrc(0) != NULL); + // check if we are moving an immediate, propagate it in that case + if (!ld || ld->fixed || (ld->op != OP_LOAD && ld->op != OP_MOV) || + !(ld->src(0).getFile() == FILE_IMMEDIATE)) + bld.mkMovToReg(s, i->getSrc(s)); + else { + bld.mkMovToReg(s, ld->getSrc(0)); + // Clear the src, to make code elimination possible here before we + // delete the instruction i later + i->setSrc(s, NULL); + if (ld->isDead()) +...
2015 Jan 11
1
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
...llium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp >> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp >> @@ -939,9 +939,20 @@ CodeEmitterNV50::emitFMAD(const Instruction *i) >> >> code[0] = 0xe0000000; >> >> + if (i->src(1).getFile() == FILE_IMMEDIATE) { >> + code[1] = 0; >> + emitForm_IMM(i); >> + code[0] |= neg_mul << 15; >> + code[0] |= neg_add << 22; >> + if (i->saturate) >> + code[0] |= 1 << 8; >> + } else >> if (i->encSize ==...
2017 Mar 26
5
[PATCH v5 0/5] nvc0/ir: add support for MAD/FMA PostRALoadPropagation
was "nv50/ir: PostRaConstantFolding improvements" before. nothing really changed from the last version, just minor things. Karol Herbst (5): nv50/ir: restructure and rename postraconstantfolding pass nv50/ir: implement mad post ra folding for nvc0+ gk110/ir: add LIMM form of mad gm107/ir: add LIMM form of mad nv50/ir: also do PostRaLoadPropagation for FMA
2015 Nov 05
7
[PATCH mesa 0/5] nouveau: codegen: Make use of double immediates
Hi All, This series implements using double immediates in the nouveau codegen code. This turns the following (nvc0) code: 1: mov u32 $r2 0x00000000 (8) 2: mov u32 $r3 0x3fe00000 (8) 3: add f64 $r0d $r0d $r2d (8) Into: 1: add f64 $r0d $r0d 0.500000 (8) This has been tested with the 2 double shader tests which I just send to the piglet list. On a gk208 (gk110 / SM35)
2016 Mar 17
4
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
...e30..7ae0cb2 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -373,7 +373,7 @@ static nv50_ir::DataFile translateFile(uint file) case TGSI_FILE_PREDICATE: return nv50_ir::FILE_PREDICATE; case TGSI_FILE_IMMEDIATE: return nv50_ir::FILE_IMMEDIATE; case TGSI_FILE_SYSTEM_VALUE: return nv50_ir::FILE_SYSTEM_VALUE; - case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_GLOBAL; + case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_BUFFER; case TGSI_FILE_MEMORY: return...
2014 May 03
0
[PATCH] nv50/ir: allow load propagation when flags are defined
...odegen/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
0
[PATCH 3/3] nv50/ir: Fold IMM into MAD
....getFile() == FILE_GPR && + i->getDef(0)->reg.data.id == i->getSrc(2)->reg.data.id) { + for (int s = 1; s >= 0; s--) { + def = i->getSrc(1)->getInsn(); + if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) { + vtmp = i->getSrc(1); + i->setSrc(1, def->getSrc(0)); + if (vtmp->refCount() == 0) + delete_Instruction(bb->getProgram(), def); + break; + } + + vtmp = i->get...
2015 Jan 11
0
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
...100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp > @@ -939,9 +939,20 @@ CodeEmitterNV50::emitFMAD(const Instruction *i) > > code[0] = 0xe0000000; > > + if (i->src(1).getFile() == FILE_IMMEDIATE) { > + code[1] = 0; > + emitForm_IMM(i); > + code[0] |= neg_mul << 15; > + code[0] |= neg_add << 22; > + if (i->saturate) > + code[0] |= 1 << 8; > + } else > if (i->encSize == 4) { > emitForm_MUL(i);...
2015 Jan 13
0
[PATCH 2/3] nv50/ir: Fold IMM into MAD
...).getFile() != FILE_GPR || + i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id) + break; + + for (int s = 0; s < 2; s++) { + def = i->getSrc(1)->getInsn(); + if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) { + vtmp = i->getSrc(1); + i->setSrc(1, def->getSrc(0)); + + /* There's no post-RA dead code elimination, so do it here + * XXX: if we add more code-removing post-RA passes, we might + * want to create a p...
2015 Jan 23
0
[PATCH 2/2] nv50/ir: Fold IMM into MAD
...tFile() != FILE_GPR || + i->src(2).getFile() != FILE_GPR || + i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id) + break; + + def = i->getSrc(1)->getInsn(); + if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) { + vtmp = i->getSrc(1); + i->setSrc(1, def->getSrc(0)); + + /* There's no post-RA dead code elimination, so do it here + * XXX: if we add more code-removing post-RA passes, we might + * want to create a post-RA dead-cod...
2015 Feb 06
0
[PATCH 3/3] nv50/ir: Fold IMM into MAD
...tFile() != FILE_GPR || + i->src(2).getFile() != FILE_GPR || + i->getDef(0)->reg.data.id != i->getSrc(2)->reg.data.id) + break; + + def = i->getSrc(1)->getInsn(); + if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) { + vtmp = i->getSrc(1); + i->setSrc(1, def->getSrc(0)); + + /* There's no post-RA dead code elimination, so do it here + * XXX: if we add more code-removing post-RA passes, we might + * want to create a post-RA dead-cod...
2017 Aug 12
0
[PATCH] nvc0/ir: propagate immediates to CALL input MOVs
...ng an immediate, propagate it in that case > + if (!ld || ld->fixed || (ld->op != OP_LOAD && ld->op != OP_MOV) || > + !ld->src(0).getImmediate(imm)) At this point you don't even have to use getImmediate - you can just look at ld->src(0).getFile() == FILE_IMMEDIATE. Normally you'd just do i->src(s).getImmediate(imm) and moved on with life. But you kinda need the ld here, which is annoying. Perhaps you can just drop the manual deletion of the op here... which would let you do the much simpler thing. Can you see if there's any effect from that?...
2016 Apr 08
2
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
...drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp >> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp >> @@ -373,7 +373,7 @@ static nv50_ir::DataFile translateFile(uint file) >> case TGSI_FILE_PREDICATE: return nv50_ir::FILE_PREDICATE; >> case TGSI_FILE_IMMEDIATE: return nv50_ir::FILE_IMMEDIATE; >> case TGSI_FILE_SYSTEM_VALUE: return nv50_ir::FILE_SYSTEM_VALUE; >> - case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_GLOBAL; >> + case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_BUFFER; >>...
2016 Mar 23
0
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
...- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp > @@ -373,7 +373,7 @@ static nv50_ir::DataFile translateFile(uint file) > case TGSI_FILE_PREDICATE: return nv50_ir::FILE_PREDICATE; > case TGSI_FILE_IMMEDIATE: return nv50_ir::FILE_IMMEDIATE; > case TGSI_FILE_SYSTEM_VALUE: return nv50_ir::FILE_SYSTEM_VALUE; > - case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_GLOBAL; > + case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_BUFFER; > case TGSI_FILE_M...
2016 Apr 12
2
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
...from_tgsi.cpp >>>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp >>>> @@ -373,7 +373,7 @@ static nv50_ir::DataFile translateFile(uint file) >>>> case TGSI_FILE_PREDICATE: return nv50_ir::FILE_PREDICATE; >>>> case TGSI_FILE_IMMEDIATE: return nv50_ir::FILE_IMMEDIATE; >>>> case TGSI_FILE_SYSTEM_VALUE: return nv50_ir::FILE_SYSTEM_VALUE; >>>> - case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMORY_GLOBAL; >>>> + case TGSI_FILE_BUFFER: return nv50_ir::FILE_MEMOR...