[Branch,~afrantzis/glmark2/trunk] Rev 91: Use a "safer" pixel for the ...

My dashboard
Submitter alexandros.frantzis@linaro.org
Subject [Branch,~afrantzis/glmark2/trunk] Rev 91: Use a "safer" pixel for the validation of SceneTexture.
Date June 24, 2011, 9:57 a.m.
List thread <20110624095714.11861.14393.launchpad@loganberry.canonical.com>
Project glmark2
State Accepted
Last updated June 24, 2011, 9:57 a.m.
Headers show

Comments

noreply@launchpad.net - June 24, 2011, 9:57 a.m.
------------------------------------------------------------
revno: 91
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
branch nick: trunk
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/~afrantzis/glmark2/trunk

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

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;