[Mesa-dev] [PATCH 2/2] gk110/ir: always use limm form for log ops with immediates

Ilia Mirkin imirkin at alum.mit.edu
Fri Mar 16 22:10:51 UTC 2018


You got the subjects backwards.

On Fri, Mar 16, 2018 at 6:05 PM, Karol Herbst <kherbst at redhat.com> wrote:
> in the short imm form 0x80000 was sign-extended to 0xfff80000 which leads to
> wrong results.
>
> Signed-off-by: Karol Herbst <kherbst at redhat.com>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
> index 58594f02c7f..644bd11ec28 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
> @@ -887,7 +887,7 @@ CodeEmitterNVC0::emitLogicOp(const Instruction *i, uint8_t subOp)
>        }
>     } else
>     if (i->encSize == 8) {
> -      if (isLIMM(i->src(1), TYPE_U32)) {
> +      if (i->src(1).getFile() == FILE_IMMEDIATE) {
>           emitForm_A(i, HEX64(38000000, 00000002));
>
>           if (i->flagsDef >= 0)

Should probably assert i->src(1).mod == 0?


More information about the mesa-dev mailing list