search for: util_iround

Displaying 20 results from an estimated 23 matches for "util_iround".

2015 Jan 09
3
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(...
2014 Jul 05
1
[PATCH v4] nv50/ir: Handle OP_CVT when folding constant expressions
...break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) { + int32_t conv = util_iround(imm0.reg.data.f32); + res.data.u16 = (conv < 0) ? 0 : CLAMP((uint32_t)conv, 0, + UINT16_MAX); + } + else res.data.u16 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: +...
2015 Jan 10
0
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...gt; + Storage res; > + bld.setPosition(i, true); /* make sure bld is init'ed */ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); > + else > + res.data.u16 = util_iround(imm0.reg.data.f32); > + break; > + case TYPE_F64: The F64 stuff needs more thought, as I don't think w...
2014 Jul 06
0
[PATCH v5] nv50/ir: Handle OP_CVT when folding constant expressions
...break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(...
2015 Jan 10
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + default: + return; + } + i->setSrc(0, bld.mkImm(res.data.u16)); +...
2014 Jul 03
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...ue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: res.data.u16 = util_iround(imm0.reg.data.f32); break; + case TYPE_F64: res.data.u16 = util_iround(imm0.reg.data.f64); break; + default: + return; + } + i->setSrc(0, bld.mkImm(res.data.u16)); + break; + case TYPE_U32: + switch (i->sType) { + case TY...
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...gt; + Storage res; > + bld.setPosition(i, true); /* make sure bld is init'ed */ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); Where did this saturate stuff come from? It doesn't make sense to saturate to a non-float dtype. I'd go ahead and just assert(!i->saturate) in the int dtype cases. One does wonder what the h...
2014 Jul 03
1
[PATCH v3 1/2] nv50/ir: Add support for the double Type to BuildUtil
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- .../drivers/nouveau/codegen/nv50_ir_build_util.cpp | 17 +++++++++++++++++ .../drivers/nouveau/codegen/nv50_ir_build_util.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...> + bld.setPosition(i, true); /* make sure bld is init'ed */ >> + switch(i->dType) { >> + case TYPE_U16: >> + switch (i->sType) { >> + case TYPE_F32: >> + if (i->saturate) >> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >> + UINT16_MAX)); > Where did this saturate stuff come from? It doesn't make sense to > saturate to a non-float dtype. I'd go ahead and just > assert(!i->saturate) in the int dtype cases. > >...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data.f32); + break; + default: + return; + } + i->setSrc(0, bld.mkImm(res.data.u16)); +...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...; + switch(i->dType) { >>>>>> + case TYPE_U16: >>>>>> + switch (i->sType) { >>>>>> + case TYPE_F32: >>>>>> + if (i->saturate) >>>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>>> + UINT16_MAX)); >>>>> Where did this saturate stuff come from? It doesn't make sense to >>>>> saturate to a non-float dtype. I'd go ahead and just >>>&g...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...>>>>> + switch(i->dType) { >>>>> + case TYPE_U16: >>>>> + switch (i->sType) { >>>>> + case TYPE_F32: >>>>> + if (i->saturate) >>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>> + UINT16_MAX)); >>>>> + else >>>>> + res.data.u16 = util_iround(imm0.reg.data.f32); >>>>> + break; >>>>> +...
2014 Jun 15
4
[PATCH v2 0/3] ARB_viewport_array for nvc0
This patch-series implements the ARB_viewport_array for nvc0 and does a little house-cleanig afterwords. V2: Add Release-Notes, mark this in GL3 as done for nvc0 Don't mark the scissors dirty when we don't need to do that Tobias Klausmann (3): nvc0: implement multiple viewports/scissors, enable ARB_viewport_array docs: update GL3.txt, relnotes: mark GL_ARB_viewport_array as done
2014 Jun 15
0
[PATCH v2 1/3] nvc0: implement multiple viewports/scissors, enable ARB_viewport_array
...ATAf(push, vp->translate[2]); - BEGIN_NVC0(push, NVC0_3D(VIEWPORT_SCALE_X(0)), 3); - PUSH_DATAf(push, vp->scale[0]); - PUSH_DATAf(push, vp->scale[1]); - PUSH_DATAf(push, vp->scale[2]); - - /* now set the viewport rectangle to viewport dimensions for clipping */ - - x = util_iround(MAX2(0.0f, vp->translate[0] - fabsf(vp->scale[0]))); - y = util_iround(MAX2(0.0f, vp->translate[1] - fabsf(vp->scale[1]))); - w = util_iround(vp->translate[0] + fabsf(vp->scale[0])) - x; - h = util_iround(vp->translate[1] + fabsf(vp->scale[1])) - y; - - zmin = vp...
2014 Jun 14
0
[PATCH 1/3] nvc0: implement multiple viewports/scissors, enable ARB_viewport_array
...ATAf(push, vp->translate[2]); - BEGIN_NVC0(push, NVC0_3D(VIEWPORT_SCALE_X(0)), 3); - PUSH_DATAf(push, vp->scale[0]); - PUSH_DATAf(push, vp->scale[1]); - PUSH_DATAf(push, vp->scale[2]); - - /* now set the viewport rectangle to viewport dimensions for clipping */ - - x = util_iround(MAX2(0.0f, vp->translate[0] - fabsf(vp->scale[0]))); - y = util_iround(MAX2(0.0f, vp->translate[1] - fabsf(vp->scale[1]))); - w = util_iround(vp->translate[0] + fabsf(vp->scale[0])) - x; - h = util_iround(vp->translate[1] + fabsf(vp->scale[1])) - y; - - zmin = vp...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...gt; + Storage res; > + bld.setPosition(i, true); /* make sure bld is init'ed */ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); > + else > + res.data.u16 = util_iround(imm0.reg.data.f32); > + break; > + default: > + return; > + } This won't get h...
2014 Jun 14
7
[PATCH 0/3] ARB_viewport_array for nvc0
This patch-series implements the ARB_viewport_array for nvc0 and does a little house-cleanig afterwords. Tobias Klausmann (3): nvc0: implement multiple viewports/scissors, enable ARB_viewport_array nvc0: mark scissor in nvc0_clear_{} nv50/ir: Remove NV50_SEMANTIC_VIEWPORTINDEX and its last consumer .../drivers/nouveau/codegen/nv50_ir_driver.h | 1 -
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...ion(i, true); /* make sure bld is init'ed */ >>> + switch(i->dType) { >>> + case TYPE_U16: >>> + switch (i->sType) { >>> + case TYPE_F32: >>> + if (i->saturate) >>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>> + UINT16_MAX)); >>> + else >>> + res.data.u16 = util_iround(imm0.reg.data.f32); >>> + break; >>> + default: >>> +...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...> + bld.setPosition(i, true); /* make sure bld is init'ed */ >> + switch(i->dType) { >> + case TYPE_U16: >> + switch (i->sType) { >> + case TYPE_F32: >> + if (i->saturate) >> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >> + UINT16_MAX)); >> + else >> + res.data.u16 = util_iround(imm0.reg.data.f32); >> + break; >> + default: >> + return; >> +...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...re bld is init'ed */ >>>> + switch(i->dType) { >>>> + case TYPE_U16: >>>> + switch (i->sType) { >>>> + case TYPE_F32: >>>> + if (i->saturate) >>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>> + UINT16_MAX)); >>>> + else >>>> + res.data.u16 = util_iround(imm0.reg.data.f32); >>>> + break; >>>> + default: >...