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

Side by Side Diff: client/deps/glbench/src/yuv2rgb_2.glslv

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 unified diff | Download patch
« no previous file with comments | « client/deps/glbench/src/yuv2rgb_2.glslf ('k') | client/deps/glbench/src/yuvtest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 uniform float imageHeight; 1 uniform float imageHeight;
2 2
3 attribute vec4 c; 3 attribute vec4 c;
4 4
5 #define I915_WORKAROUND 1
6
7 varying vec2 lineCounter; 5 varying vec2 lineCounter;
8 varying vec2 yPlane; 6 varying vec2 yPlane;
9 varying vec2 uPlane; 7 varying vec2 uPlane;
10 varying vec2 vPlane; 8 varying vec2 vPlane;
11 9
12 void main() { 10 void main() {
13 gl_Position = c; 11 gl_Position = c;
14 #if I915_WORKAROUND 12 #if defined(I915_WORKAROUND)
15 gl_TexCoord[0].xy = vec2(c.y * imageHeight / 4.0, 0.0); 13 gl_TexCoord[0].xy = vec2(c.y * imageHeight / 4.0, 0.0);
16 gl_TexCoord[0].zw = vec2(c.x, (2.0 * c.y + 1.0) / 3.0); 14 gl_TexCoord[0].zw = vec2(c.x, (2.0 * c.y + 1.0) / 3.0);
17 gl_TexCoord[1].xy = vec2(c.x / 2.0, (c.y + 1.0) / 6.0); 15 gl_TexCoord[1].xy = vec2(c.x / 2.0, (c.y + 1.0) / 6.0);
18 gl_TexCoord[1].zw = vec2(c.x / 2.0, c.y / 6.0); 16 gl_TexCoord[1].zw = vec2(c.x / 2.0, c.y / 6.0);
19 #else 17 #else
20 lineCounter = vec2(c.y * imageHeight / 4.0, 0.0); 18 lineCounter = vec2(c.y * imageHeight / 4.0, 0.0);
21 yPlane = vec2(c.x, (2.0 * c.y + 1.0) / 3.0); 19 yPlane = vec2(c.x, (2.0 * c.y + 1.0) / 3.0);
22 uPlane = vec2(c.x / 2.0, (c.y + 1.0) / 6.0); 20 uPlane = vec2(c.x / 2.0, (c.y + 1.0) / 6.0);
23 vPlane = vec2(c.x / 2.0, c.y / 6.0); 21 vPlane = vec2(c.x / 2.0, c.y / 6.0);
24 #endif 22 #endif
25 } 23 }
26 24
OLDNEW
« no previous file with comments | « client/deps/glbench/src/yuv2rgb_2.glslf ('k') | client/deps/glbench/src/yuvtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698