[Mesa-dev] [PATCH 1/7] i965: Mark is_tex() and friends as const.

Anuj Phogat anuj.phogat at gmail.com
Wed Apr 2 17:43:01 PDT 2014


On Mon, Mar 31, 2014 at 10:16 AM, Matt Turner <mattst88 at gmail.com> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_shader.cpp | 10 +++++-----
>  src/mesa/drivers/dri/i965/brw_shader.h   | 10 +++++-----
>  2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
> index bbc5f3d..ca448d0 100644
> --- a/src/mesa/drivers/dri/i965/brw_shader.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
> @@ -552,7 +552,7 @@ backend_visitor::backend_visitor(struct brw_context *brw,
>  }
>
>  bool
> -backend_instruction::is_tex()
> +backend_instruction::is_tex() const
>  {
>     return (opcode == SHADER_OPCODE_TEX ||
>             opcode == FS_OPCODE_TXB ||
> @@ -569,7 +569,7 @@ backend_instruction::is_tex()
>  }
>
>  bool
> -backend_instruction::is_math()
> +backend_instruction::is_math() const
>  {
>     return (opcode == SHADER_OPCODE_RCP ||
>             opcode == SHADER_OPCODE_RSQ ||
> @@ -584,7 +584,7 @@ backend_instruction::is_math()
>  }
>
>  bool
> -backend_instruction::is_control_flow()
> +backend_instruction::is_control_flow() const
>  {
>     switch (opcode) {
>     case BRW_OPCODE_DO:
> @@ -601,7 +601,7 @@ backend_instruction::is_control_flow()
>  }
>
>  bool
> -backend_instruction::can_do_source_mods()
> +backend_instruction::can_do_source_mods() const
>  {
>     switch (opcode) {
>     case BRW_OPCODE_ADDC:
> @@ -620,7 +620,7 @@ backend_instruction::can_do_source_mods()
>  }
>
>  bool
> -backend_instruction::can_do_saturate()
> +backend_instruction::can_do_saturate() const
>  {
>     switch (opcode) {
>     case BRW_OPCODE_ADD:
> diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
> index 086d042..6bd7dc8 100644
> --- a/src/mesa/drivers/dri/i965/brw_shader.h
> +++ b/src/mesa/drivers/dri/i965/brw_shader.h
> @@ -42,11 +42,11 @@ enum PACKED register_file {
>
>  class backend_instruction : public exec_node {
>  public:
> -   bool is_tex();
> -   bool is_math();
> -   bool is_control_flow();
> -   bool can_do_source_mods();
> -   bool can_do_saturate();
> +   bool is_tex() const;
> +   bool is_math() const;
> +   bool is_control_flow() const;
> +   bool can_do_source_mods() const;
> +   bool can_do_saturate() const;
>
>     /**
>      * True if the instruction has side effects other than writing to
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Patches 1-5 are:
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>

I'm not familiar enough with this code. So, not planning to review
patches 6 and 7.


More information about the mesa-dev mailing list