[Piglit] [PATCH 18/20] msaa: Fix const correctness of TestPattern::draw() function.

Anuj Phogat anuj.phogat at gmail.com
Wed Jun 6 16:49:32 PDT 2012


On Tue, Jun 5, 2012 at 5:03 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> ---
>  tests/spec/ext_framebuffer_multisample/common.cpp |   10 +++++-----
>  tests/spec/ext_framebuffer_multisample/common.h   |   12 ++++++------
>  2 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/tests/spec/ext_framebuffer_multisample/common.cpp b/tests/spec/ext_framebuffer_multisample/common.cpp
> index d7cbe9c..bbd4d8f 100644
> --- a/tests/spec/ext_framebuffer_multisample/common.cpp
> +++ b/tests/spec/ext_framebuffer_multisample/common.cpp
> @@ -660,7 +660,7 @@ void Triangles::compile()
>                              GL_FALSE, sizeof(pos_within_tri[0]), (void *) 0);
>  }
>
> -void Triangles::draw(float (*proj)[4])
> +void Triangles::draw(const float (*proj)[4])
>  {
>        glClear(GL_COLOR_BUFFER_BIT);
>
> @@ -762,7 +762,7 @@ void Lines::compile()
>                              GL_FALSE, sizeof(pos_line[0]), (void *) 0);
>  }
>
> -void Lines::draw(float (*proj)[4])
> +void Lines::draw(const float (*proj)[4])
>  {
>        glClear(GL_COLOR_BUFFER_BIT);
>        glUseProgram(prog);
> @@ -857,7 +857,7 @@ void Points::compile()
>                              GL_FALSE, 0, (void *) 0);
>  }
>
> -void Points::draw(float (*proj)[4])
> +void Points::draw(const float (*proj)[4])
>  {
>        glClear(GL_COLOR_BUFFER_BIT);
>        glUseProgram(prog);
> @@ -973,7 +973,7 @@ ColorGradientSunburst::draw(const float (*proj)[4])
>  }
>
>  void
> -StencilSunburst::draw(float (*proj)[4])
> +StencilSunburst::draw(const float (*proj)[4])
>  {
>        glEnable(GL_STENCIL_TEST);
>        glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
> @@ -993,7 +993,7 @@ StencilSunburst::draw(float (*proj)[4])
>  }
>
>  void
> -DepthSunburst::draw(float (*proj)[4])
> +DepthSunburst::draw(const float (*proj)[4])
>  {
>        glEnable(GL_DEPTH_TEST);
>        glDepthFunc(GL_LESS);
> diff --git a/tests/spec/ext_framebuffer_multisample/common.h b/tests/spec/ext_framebuffer_multisample/common.h
> index 0e6913f..659e1c8 100644
> --- a/tests/spec/ext_framebuffer_multisample/common.h
> +++ b/tests/spec/ext_framebuffer_multisample/common.h
> @@ -221,7 +221,7 @@ public:
>         * to vertex coordinates.  The projection matrix is in
>         * row-major order.
>         */
> -       virtual void draw(float (*proj)[4]) = 0;
> +       virtual void draw(const float (*proj)[4]) = 0;
>  };
>
>  /**
> @@ -236,7 +236,7 @@ class Triangles : public TestPattern
>  {
>  public:
>        virtual void compile();
> -       virtual void draw(float (*proj)[4]);
> +       virtual void draw(const float (*proj)[4]);
>
>  private:
>        GLint prog;
> @@ -257,7 +257,7 @@ class Points : public TestPattern
>  {
>  public:
>        virtual void compile();
> -       virtual void draw(float (*proj)[4]);
> +       virtual void draw(const float (*proj)[4]);
>
>  private:
>        GLint prog;
> @@ -279,7 +279,7 @@ class Lines : public TestPattern
>  {
>  public:
>        virtual void compile();
> -       virtual void draw(float (*proj)[4]);
> +       virtual void draw(const float (*proj)[4]);
>
>  private:
>        GLint prog;
> @@ -342,7 +342,7 @@ public:
>  class StencilSunburst : public Sunburst
>  {
>  public:
> -       virtual void draw(float (*proj)[4]);
> +       virtual void draw(const float (*proj)[4]);
>  };
>
>  /**
> @@ -356,7 +356,7 @@ public:
>  class DepthSunburst : public Sunburst
>  {
>  public:
> -       virtual void draw(float (*proj)[4]);
> +       virtual void draw(const float (*proj)[4]);
>  };
>
>  /**
> --
> 1.7.7.6
>

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list