[Piglit] [PATCH] glean/fbo: fix GL_LINES vertex coordinates

Brian Paul brianp at vmware.com
Thu Jun 30 16:57:50 UTC 2016


On 06/30/2016 09:57 AM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> The first case had had the change already, but lacked an explanation.
>
> See the OpenGL 4.5 Core spec, section 14.5.1, figure 14.2, page 450.
> ---
>   tests/glean/tfbo.cpp | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/tests/glean/tfbo.cpp b/tests/glean/tfbo.cpp
> index eb66af4..3662d5d 100644
> --- a/tests/glean/tfbo.cpp
> +++ b/tests/glean/tfbo.cpp
> @@ -607,6 +607,8 @@ FBOTest::testRender2SingleTexture(void)
>                                           case GL_TEXTURE_1D:
>                                                   glBegin(GL_LINES);
>                                                   glVertex3f(TEXSIZE / 4, 0.5, 0.3);
> +						/* + 0.25 pixels because the last line pixel
> +						 * isn't drawn according to the GL spec */
>                                                   glVertex3f(TEXSIZE * 5 / 8 + 0.25, 0.5, 0.3);
>                                                   glEnd();
>                                                   break;
> @@ -637,7 +639,9 @@ FBOTest::testRender2SingleTexture(void)
>                                           case GL_TEXTURE_1D:
>                                                   glBegin(GL_LINES);
>                                                   glVertex3f(TEXSIZE / 2, 0.5, 0.3);
> -                                                glVertex3f(TEXSIZE * 7 / 8, 0.5, 0.3);
> +						/* + 0.25 pixels because the last line pixel
> +						 * isn't drawn according to the GL spec */
> +                                                glVertex3f(TEXSIZE * 7 / 8 + 0.25, 0.5, 0.3);
>                                                   glEnd();
>                                                   break;
>                                           case GL_TEXTURE_2D:
> @@ -668,7 +672,9 @@ FBOTest::testRender2SingleTexture(void)
>                                   case GL_TEXTURE_1D:
>                                           glBegin(GL_LINES);
>                                           glVertex3f(0, 0.5, 0.2);
> -                                        glVertex3f(TEXSIZE, 0.5, 0.2);
> +					/* + 0.25 pixels because the last line pixel
> +					 * isn't drawn according to the GL spec */
> +                                        glVertex3f(TEXSIZE + 0.25, 0.5, 0.2);
>                                           glEnd();
>                                           break;
>                                   case GL_TEXTURE_2D:
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list