[Mesa-dev] [PATCH] nv30: Remove unused function nv40_fp_bra.

Ilia Mirkin imirkin at alum.mit.edu
Fri Mar 6 23:21:16 PST 2015


On Sat, Mar 7, 2015 at 2:15 AM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fix GCC unused-function warning.
>
> nv30/nvfx_fragprog.c:333:1: warning: ‘nv40_fp_bra’ defined but not used [-Wunused-function]
>  nv40_fp_bra(struct nvfx_fpc *fpc, unsigned target)
>  ^

NAK. Feel free to ifdef it out if it really annoys you. For better or
for worse, this is the only place where this stuff is really
documented.

>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c | 26 ------------------------
>  1 file changed, 26 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
> index 6600997..e843ab8 100644
> --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
> +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
> @@ -328,32 +328,6 @@ nv40_fp_rep(struct nvfx_fpc *fpc, unsigned count, unsigned target)
>          //util_dynarray_append(&fpc->loop_stack, unsigned, target);
>  }
>
> -/* warning: this only works forward, and probably only if not inside any IF */
> -static void
> -nv40_fp_bra(struct nvfx_fpc *fpc, unsigned target)
> -{
> -        struct nvfx_relocation reloc;
> -        uint32_t *hw;
> -        fpc->inst_offset = fpc->fp->insn_len;
> -        grow_insns(fpc, 4);
> -        hw = &fpc->fp->insn[fpc->inst_offset];
> -        /* I really wonder why fp16 precision is used. Presumably the hardware ignores it? */
> -        hw[0] = (NV40_FP_OP_BRA_OPCODE_IF << NVFX_FP_OP_OPCODE_SHIFT) |
> -                NV40_FP_OP_OUT_NONE |
> -                (NVFX_FP_PRECISION_FP16 << NVFX_FP_OP_PRECISION_SHIFT);
> -        /* Use .xxxx swizzle so that we check only src[0].x*/
> -        hw[1] = (NVFX_SWZ_IDENTITY << NVFX_FP_OP_COND_SWZ_X_SHIFT) |
> -                        (NVFX_FP_OP_COND_FL << NVFX_FP_OP_COND_SHIFT);
> -        hw[2] = NV40_FP_OP_OPCODE_IS_BRANCH; /* | else_offset */
> -        hw[3] = 0; /* | endif_offset */
> -        reloc.target = target;
> -        reloc.location = fpc->inst_offset + 2;
> -        util_dynarray_append(&fpc->label_relocs, struct nvfx_relocation, reloc);
> -        reloc.target = target;
> -        reloc.location = fpc->inst_offset + 3;
> -        util_dynarray_append(&fpc->label_relocs, struct nvfx_relocation, reloc);
> -}
> -
>  static void
>  nv40_fp_brk(struct nvfx_fpc *fpc)
>  {
> --
> 2.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list