search for: op_sat

Displaying 13 results from an estimated 13 matches for "op_sat".

2014 Nov 18
2
[PATCH] nv50/ir: saturate FRC result to avoid completely bogus values
...::handleInstruction(const struct tgsi_full_instruction *insn) src0 = fetchSrc(0, c); val0 = getScratch(); mkOp1(OP_FLOOR, TYPE_F32, val0, src0); - mkOp2(OP_SUB, TYPE_F32, dst0[c], src0, val0); + mkOp2(OP_SUB, TYPE_F32, val0, src0, val0); + mkOp1(OP_SAT, TYPE_F32, dst0[c], val0); } break; case TGSI_OPCODE_ROUND: -- 2.0.4
2014 Nov 18
2
[Mesa-dev] [PATCH] nv50/ir: saturate FRC result to avoid completely bogus values
...*insn) >> src0 = fetchSrc(0, c); >> val0 = getScratch(); >> mkOp1(OP_FLOOR, TYPE_F32, val0, src0); >> - mkOp2(OP_SUB, TYPE_F32, dst0[c], src0, val0); >> + mkOp2(OP_SUB, TYPE_F32, val0, src0, val0); >> + mkOp1(OP_SAT, TYPE_F32, dst0[c], val0); >> } >> break; >> case TGSI_OPCODE_ROUND: >> > > I don't understand the math behind this. For any such large number, as > far as I can tell floor(val) == val and hence the end result ought to be > zero. Or doesn...
2014 Nov 18
1
[Mesa-dev] [PATCH] nv50/ir: saturate FRC result to avoid completely bogus values
...(0, c); >>>> val0 = getScratch(); >>>> mkOp1(OP_FLOOR, TYPE_F32, val0, src0); >>>> - mkOp2(OP_SUB, TYPE_F32, dst0[c], src0, val0); >>>> + mkOp2(OP_SUB, TYPE_F32, val0, src0, val0); >>>> + mkOp1(OP_SAT, TYPE_F32, dst0[c], val0); >>>> } >>>> break; >>>> case TGSI_OPCODE_ROUND: >>>> >>> >>> I don't understand the math behind this. For any such large number, as >>> far as I can tell floor(val) == val...
2014 Jun 03
8
[PATCH v2 0/4] Constant folding of new Instructions
And another try for constant folding of Instructions for nvc0. Please Review this! Thanks, Tobias Klausmann Tobias Klausmann (4): nvc0/ir: clear subop when folding constant expressions nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressions nvc0/ir: Handle OP_BFIND when folding constant expressions nvc0/ir: Handle OP_POPCNT when folding constant expressions
2014 May 29
0
[PATCH 1/4] nvc0/ir: clear subop when folding constant expressions
.../nouveau/codegen/nv50_ir_peephole.cpp index 1a2c2e6..58092f4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -563,6 +563,7 @@ ConstantFolding::expr(Instruction *i, } else { i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */ } + i->subOp = 0; } void -- 1.8.4.5
2014 Jun 03
0
[PATCH v2 1/4] nvc0/ir: clear subop when folding constant expressions
.../nouveau/codegen/nv50_ir_peephole.cpp index 1a2c2e6..58092f4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -563,6 +563,7 @@ ConstantFolding::expr(Instruction *i, } else { i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */ } + i->subOp = 0; } void -- 1.8.4.5
2014 Jun 03
0
[PATCH v3 1/4] nvc0/ir: clear subop when folding constant expressions
.../nouveau/codegen/nv50_ir_peephole.cpp index 1a2c2e6..58092f4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -563,6 +563,7 @@ ConstantFolding::expr(Instruction *i, } else { i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */ } + i->subOp = 0; } void -- 1.8.4.5
2014 Sep 01
0
[PATCH] nv50/ir: avoid creating instructions that can't be emitted
...src0)) expr(i, src0, *i->getSrc(1)->asImm()); + if (i->saturate && !prog->getTarget()->isSatSupported(i)) { + bld.setPosition(i, false); + i->setSrc(1, bld.loadImm(NULL, res.data.u32)); + } } else { i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */ } -- 1.8.5.5
2014 Nov 18
0
[Mesa-dev] [PATCH] nv50/ir: saturate FRC result to avoid completely bogus values
...ct tgsi_full_instruction *insn) > src0 = fetchSrc(0, c); > val0 = getScratch(); > mkOp1(OP_FLOOR, TYPE_F32, val0, src0); > - mkOp2(OP_SUB, TYPE_F32, dst0[c], src0, val0); > + mkOp2(OP_SUB, TYPE_F32, val0, src0, val0); > + mkOp1(OP_SAT, TYPE_F32, dst0[c], val0); > } > break; > case TGSI_OPCODE_ROUND: > I don't understand the math behind this. For any such large number, as far as I can tell floor(val) == val and hence the end result ought to be zero. Or doesn't your floor work like that? Ro...
2014 Nov 18
0
[Mesa-dev] [PATCH] nv50/ir: saturate FRC result to avoid completely bogus values
...src0 = fetchSrc(0, c); >>> val0 = getScratch(); >>> mkOp1(OP_FLOOR, TYPE_F32, val0, src0); >>> - mkOp2(OP_SUB, TYPE_F32, dst0[c], src0, val0); >>> + mkOp2(OP_SUB, TYPE_F32, val0, src0, val0); >>> + mkOp1(OP_SAT, TYPE_F32, dst0[c], val0); >>> } >>> break; >>> case TGSI_OPCODE_ROUND: >>> >> >> I don't understand the math behind this. For any such large number, as >> far as I can tell floor(val) == val and hence the end result ought...
2014 May 20
14
[PATCH 00/12] Cherry-pick nv50/nvc0 patches from gallium-nine
I went through the gallium-nine tree and picked out nouveau patches that are general bug-fixes. The first bunch I'd like to also get into 10.2. I've reviewed all of them and they make sense to me, but sending them out for public review as well in case there are any objections. Unless I hear objections, I'd like to push this by Friday. Christoph Bumiller (11): nv50,nvc0: always pull
2014 May 29
4
Add constant folding for new opcodes
Hi, please review the following 4 patches: 1b1cfc6 nvc0/ir: Handle OP_BFIND when folding constant expressions d2d2727 nvc0/ir: Handle OP_POPCNT when folding constant expressions 86a1ee6 nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressions 84563bf nvc0/ir: clear subop when folding constant expressions src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 39
2014 Jun 03
6
[PATCH v3 0/4] Constant folding of new Instructions
Yet another try for constant folding of Instructions for nvc0. Please Review this again! (Hopefully the last time ;-) ) Tobias Klausmann (4): nvc0/ir: clear subop when folding constant expressions nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressions nvc0/ir: Handle OP_BFIND when folding constant expressions nvc0/ir: Handle OP_POPCNT when folding constant