[Mesa-dev] [PATCH 01/19] i965/fs: Add and use an fs_inst copy constructor.

Chris Forbes chrisf at ijw.co.nz
Tue May 27 21:23:36 PDT 2014


Patches 1-8 inclusive are

Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

On Wed, May 28, 2014 at 1:47 PM, Matt Turner <mattst88 at gmail.com> wrote:
> Will get more complicated when fs_reg src becomes a pointer.
> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 5 +++++
>  src/mesa/drivers/dri/i965/brw_fs.h   | 1 +
>  2 files changed, 6 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index bd77e0c..5b7d84f 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -139,6 +139,11 @@ fs_inst::fs_inst(enum opcode opcode, fs_reg dst,
>        assert(src[2].reg_offset >= 0);
>  }
>
> +fs_inst::fs_inst(const fs_inst &that)
> +{
> +   memcpy(this, &that, sizeof(that));
> +}
> +
>  #define ALU1(op)                                                        \
>     fs_inst *                                                            \
>     fs_visitor::op(fs_reg dst, fs_reg src0)                              \
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
> index 789f0b3..bda233c 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h
> @@ -197,6 +197,7 @@ public:
>     fs_inst(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1);
>     fs_inst(enum opcode opcode, fs_reg dst,
>             fs_reg src0, fs_reg src1,fs_reg src2);
> +   fs_inst(const fs_inst &that);
>
>     bool equals(fs_inst *inst) const;
>     bool overwrites_reg(const fs_reg &reg) const;
> --
> 1.8.3.2
>
> _______________________________________________
> 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