summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dawson <matthew@mjdsystems.ca>2015-03-22 01:49:22 -0400
committerMarek Olšák <marek.olsak@amd.com>2015-10-09 18:16:34 +0200
commitf75e849688b012934a5bac66edaf4074ac1d1964 (patch)
treeee96f54dc75c3961fb1d8ce803f86f3e54284a20
parent8adebbdfd30e7c34d9624395059202976e70b0c8 (diff)
draw-pixel-with-texture: adjust to ensure glTexCoord is taken into account
The old version of the test assumed the glTexCoord call was being properly used in the system. However, at least in mesa, it is easy for an implementation to ignore the given coordinate. Thus setup the texture and texture coordinate to ensure it is respected. Signed-off-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--tests/general/draw-pixel-with-texture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/general/draw-pixel-with-texture.c b/tests/general/draw-pixel-with-texture.c
index c03131ebf..4d6c3a3f5 100644
--- a/tests/general/draw-pixel-with-texture.c
+++ b/tests/general/draw-pixel-with-texture.c
@@ -39,8 +39,8 @@ piglit_display(void)
{
GLboolean pass = GL_TRUE;
GLfloat tex_data[2 * 2 * 4] = {
- 1, 0, 0, 1, 1, 0, 0, 1,
- 1, 0, 0, 1, 1, 0, 0, 1,
+ 1, 0, 0, 1, 0, 1, 1, 1,
+ 0, 1, 0, 1, 0, 0, 1, 1,
};
GLfloat *pixels;
GLfloat expected[4] = {0.2, 0, 0, 1};
@@ -53,13 +53,13 @@ piglit_display(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- glTexCoord2f(0.5, 0.5);
+ glTexCoord2f(0.25, 0.25);
glEnable(GL_TEXTURE_2D);
for (i = 0; i < SCREEN_SIZE_IN_PIXELS; i += 4) {
pixels[i + 0] = 0.2;
pixels[i + 1] = 1;
- pixels[i + 2] = 0;
+ pixels[i + 2] = 0.4;
pixels[i + 3] = 1;
}