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

Unified Diff: client/deps/glbench/src/yuv2rgb_2.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/yuv2rgb_1.glslv ('k') | client/deps/glbench/src/yuv2rgb_2.glslv » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/deps/glbench/src/yuv2rgb_2.glslf
diff --git a/client/deps/glbench/src/yuv2rgb_2.glslf b/client/deps/glbench/src/yuv2rgb_2.glslf
index 8f2276314b9bcea812af0d0a5144b81463b08986..81c7a17a662177b6d978707b9b1e2f6e7cc60345 100644
--- a/client/deps/glbench/src/yuv2rgb_2.glslf
+++ b/client/deps/glbench/src/yuv2rgb_2.glslf
@@ -35,8 +35,6 @@
* of the original image is 2 modulo 4.
*/
-#define I915_WORKAROUND 1
-
uniform sampler2D textureSampler;
uniform sampler2D paritySampler;
@@ -49,7 +47,7 @@ void main() {
/*
* If the height of the original image is even, offset_odd is not needed.
*/
-#if I915_WORKAROUND
+#if defined(I915_WORKAROUND)
vec2 offset_even = vec2(texture2D(paritySampler, gl_TexCoord[0].xy).x * 0.5,
0.0);
#else
@@ -57,7 +55,7 @@ void main() {
#endif
vec2 offset_odd = vec2(0.5 - offset_even.x, 0.0);
-#if I915_WORKAROUND
+#if defined(I915_WORKAROUND)
float yChannel = texture2D(textureSampler, gl_TexCoord[0].zw).x;
float uChannel = texture2D(textureSampler, gl_TexCoord[1].xy + offset_even).x;
float vChannel = texture2D(textureSampler, gl_TexCoord[1].zw + offset_odd).x;
« no previous file with comments | « client/deps/glbench/src/yuv2rgb_1.glslv ('k') | client/deps/glbench/src/yuv2rgb_2.glslv » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698