Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: client/deps/glbench/src/yuv2rgb_1.glslf

Issue 2152003: Moved selection of I915 hack out of the YUV shader. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/deps/glbench/src/utils.cc ('k') | client/deps/glbench/src/yuv2rgb_1.glslv » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/deps/glbench/src/yuv2rgb_1.glslf
diff --git a/client/deps/glbench/src/yuv2rgb_1.glslf b/client/deps/glbench/src/yuv2rgb_1.glslf
index c30ef2643dc371771cb42409a5652d5d2311667a..228e6a934a34a34dc22cf1d7f013a1a813000a67 100644
--- a/client/deps/glbench/src/yuv2rgb_1.glslf
+++ b/client/deps/glbench/src/yuv2rgb_1.glslf
@@ -33,7 +33,6 @@
* This is a conversion of a cg shader from Chrome:
* http://src.chromium.org/viewvc/chrome/trunk/src/o3d/samples/shaders/yuv2rgb.shader
*/
-#define I915_WORKAROUND 1
/*
* This shader takes a Y'UV420p image as a single greyscale plane, and
@@ -178,7 +177,7 @@ void main() {
* the location in the image stream, using floor in several places
* which makes it hard to use parametric coordinates.
*/
-#if I915_WORKAROUND
+#if defined(I915_WORKAROUND)
vec2 pixelPosition = vec2(floor(imageWidth * gl_TexCoord[0].x),
floor(imageHeight * gl_TexCoord[0].y));
#else
@@ -190,7 +189,7 @@ void main() {
* We can use the parametric coordinates to get the Y channel, since it's
* a relatively normal image.
*/
-#if I915_WORKAROUND
+#if defined(I915_WORKAROUND)
float yChannel = getYPixel(vec2(gl_TexCoord[0]));
#else
float yChannel = getYPixel(vec2(v1));
« no previous file with comments | « client/deps/glbench/src/utils.cc ('k') | client/deps/glbench/src/yuv2rgb_1.glslv » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698