Displaying 15 results from an estimated 15 matches for "getimmediate".
2015 Jan 04
0
[PATCH] nv50/ir: fix texture offsets in release builds
...v50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -772,7 +772,8 @@ NV50LoweringPreSSA::handleTEX(TexInstruction *i)
if (i->tex.useOffsets) {
for (int c = 0; c < 3; ++c) {
ImmediateValue val;
- assert(i->offset[0][c].getImmediate(val));
+ if (!i->offset[0][c].getImmediate(val))
+ assert(!"non-immediate offset");
i->tex.offset[c] = val.reg.data.u32;
i->offset[0][c].set(NULL);
}
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gal...
2017 Aug 12
3
[PATCH] nvc0/ir: propagate immediates to CALL input MOVs
...>srcExists(s); ++s) {
+ Instruction *ld = i->getSrc(s)->getInsn();
+ ImmediateValue imm;
+ // 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).getImmediate(imm))
+ 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->getDef(0)-&...
2017 Aug 12
0
[PATCH] nvc0/ir: propagate immediates to CALL input MOVs
...> + Instruction *ld = i->getSrc(s)->getInsn();
> + ImmediateValue imm;
> + // 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).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 manu...
2015 Aug 19
5
[PATCH 1/2] nvc0/ir: detect AND/SHR pairs and convert into EXTBF
...tSrc(s, NULL);
+ if (t) {
+ i->setSrc(0, i->getSrc(t));
+ i->setSrc(t, NULL);
+ }
+ } else if (prog->getTarget()->isOpSupported(OP_EXTBF, TYPE_U32) &&
+ src->op == OP_SHR &&
+ src->src(1).getImmediate(imm1) &&
+ i->src(t).mod == Modifier(0) &&
+ util_is_power_of_two(imm0.reg.data.u32 + 1)) {
+ // low byte = offset, high byte = width
+ uint32_t ext = (util_last_bit(imm0.reg.data.u32) << 8) | imm1.reg.data.u32;
+ i-&g...
2016 Oct 02
2
[PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD
...i->setSrc(0, i->getSrc(2));
i->src(0).mod = i->src(2).mod;
i->setSrc(1, NULL);
i->setSrc(2, NULL);
- i->op = i->src(0).mod.getOp();
- if (i->op != OP_CVT)
- i->src(0).mod = 0;
+ if (i->src(0).getImmediate(imm1)) {
+ bld.setPosition(i, false);
+ newi = bld.mkMov(i->getDef(0), bld.mkImm(imm1.reg.data.u64),
+ i->dType);
+ delete_Instruction(prog, i);
+ }
+ else {
+ i->op = i->src(0).mod.getOp();
+...
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
2016 Oct 02
2
[PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD
...>src(0).mod = i->src(2).mod;
>> i->setSrc(1, NULL);
>> i->setSrc(2, NULL);
>> - i->op = i->src(0).mod.getOp();
>> - if (i->op != OP_CVT)
>> - i->src(0).mod = 0;
>> + if (i->src(0).getImmediate(imm1)) {
>> + bld.setPosition(i, false);
>> + newi = bld.mkMov(i->getDef(0), bld.mkImm(imm1.reg.data.u64),
>> + i->dType);
>> + delete_Instruction(prog, i);
> What's an example of a situation where thi...
2016 Oct 02
0
[PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD
...Src(2));
> i->src(0).mod = i->src(2).mod;
> i->setSrc(1, NULL);
> i->setSrc(2, NULL);
> - i->op = i->src(0).mod.getOp();
> - if (i->op != OP_CVT)
> - i->src(0).mod = 0;
> + if (i->src(0).getImmediate(imm1)) {
> + bld.setPosition(i, false);
> + newi = bld.mkMov(i->getDef(0), bld.mkImm(imm1.reg.data.u64),
> + i->dType);
> + delete_Instruction(prog, i);
What's an example of a situation where this helps? It shouldn&...
2014 Sep 01
0
[PATCH] nv50/ir: avoid creating instructions that can't be emitted
...eau/codegen/nv50_ir_peephole.cpp
index 1a9a25f..719f980 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -567,6 +567,10 @@ ConstantFolding::expr(Instruction *i,
ImmediateValue src0;
if (i->src(0).getImmediate(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 ?...
2014 Jul 05
1
[PATCH 1/2] nvc0/ir: use manual TXD when offsets are involved
Something about how we're implementing offsets for TXD is wrong, just
flip to the generic quadop-based implementation in that case.
This is the minimal fix appropriate for backporting.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: <mesa-stable at lists.freedesktop.org>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 3 ++-
1 file changed, 2
2016 Oct 02
0
[PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD
...rc(2).mod;
>>> i->setSrc(1, NULL);
>>> i->setSrc(2, NULL);
>>> - i->op = i->src(0).mod.getOp();
>>> - if (i->op != OP_CVT)
>>> - i->src(0).mod = 0;
>>> + if (i->src(0).getImmediate(imm1)) {
>>> + bld.setPosition(i, false);
>>> + newi = bld.mkMov(i->getDef(0), bld.mkImm(imm1.reg.data.u64),
>>> + i->dType);
>>> + delete_Instruction(prog, i);
>>
>> What's an exa...
2016 Oct 02
1
[PATCH] nv50/ir: Propagate third immediate src when folding OP_MAD
...; i->setSrc(1, NULL);
>>>> i->setSrc(2, NULL);
>>>> - i->op = i->src(0).mod.getOp();
>>>> - if (i->op != OP_CVT)
>>>> - i->src(0).mod = 0;
>>>> + if (i->src(0).getImmediate(imm1)) {
>>>> + bld.setPosition(i, false);
>>>> + newi = bld.mkMov(i->getDef(0), bld.mkImm(imm1.reg.data.u64),
>>>> + i->dType);
>>>> + delete_Instruction(prog, i);
>>> What...
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.
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 Jan 13
20
[PATCH 00/19] nv50: add sampler2DMS/GP support to get OpenGL 3.2
OK, so there's a bunch of stuff in here. The geometry stuff is based on the
work started by Bryan Cain and Christoph Bumiller.
Patches 01-12: Add support for geometry shaders and fix related issues
Patches 13-14: Make it possible for fb clears to operate on texture attachments
with an explicit layer set (as is allowed in gl 3.2).
Patches 15-17: Make ARB_texture_multisample work