diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 91: Use a "safer" pixel for the validation of SceneTexture.

Message ID 20110721123636.17019.40745.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 91
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
timestamp: Fri 2011-06-24 11:04:32 +0300
message:
  Use a "safer" pixel for the validation of SceneTexture.
  
  Some implementations (eg SGX) introduce some small artifacts when texturing,
  especially when using nearest filtering, that confuse our validation. The
  artifacts are present along the edges of a grid-like form on the texture,
  so we can (and do) select a pixel that is not affected by this.
modified:
  src/scene-texture.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/scene-texture.cpp'
--- src/scene-texture.cpp	2011-06-23 12:48:15 +0000
+++ src/scene-texture.cpp	2011-06-24 08:04:32 +0000
@@ -185,17 +185,17 @@ 
 
     Screen::Pixel ref;
 
-    Screen::Pixel pixel = mScreen.read_pixel(mScreen.mWidth / 2,
-                                             mScreen.mHeight / 2);
+    Screen::Pixel pixel = mScreen.read_pixel(mScreen.mWidth / 2 - 3,
+                                             mScreen.mHeight / 2 - 3);
 
     const std::string &filter = mOptions["texture-filter"].value;
 
     if (filter == "nearest")
-        ref = Screen::Pixel(0x3a, 0x3a, 0x3b, 0xff);
+        ref = Screen::Pixel(0x2b, 0x2a, 0x28, 0xff);
     else if (filter == "linear")
-        ref = Screen::Pixel(0x34, 0x34, 0x35, 0xff);
+        ref = Screen::Pixel(0x2c, 0x2b, 0x29, 0xff);
     else if (filter == "mipmap")
-        ref = Screen::Pixel(0x33, 0x33, 0x35, 0xff);
+        ref = Screen::Pixel(0x2d, 0x2c, 0x2a, 0xff);
     else
         return Scene::ValidationUnknown;