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

Unified Diff: client/deps/glbench/src/varyingsandddxytest.cc

Issue 2122020: Fixes for GLES systems. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: ...and removed bogus #-I from Makefile 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.h ('k') | client/deps/glbench/src/windowmanagercompositingtest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/deps/glbench/src/varyingsandddxytest.cc
diff --git a/client/deps/glbench/src/varyingsandddxytest.cc b/client/deps/glbench/src/varyingsandddxytest.cc
index 783416788c4dc610af95dd8e9833994b77663840..22ef1c3b4f525c7836be676583968fcde2c13e16 100644
--- a/client/deps/glbench/src/varyingsandddxytest.cc
+++ b/client/deps/glbench/src/varyingsandddxytest.cc
@@ -20,7 +20,7 @@ class VaryingsAndDdxyShaderTest : public DrawElementsTestFunc {
DISALLOW_COPY_AND_ASSIGN(VaryingsAndDdxyShaderTest);
};
-#if I915_WORKAROUND
+#if defined(I915_WORKAROUND)
#define V1 "gl_TexCoord[0]"
#define V2 "gl_TexCoord[1]"
#define V3 "gl_TexCoord[2]"
@@ -29,8 +29,6 @@ class VaryingsAndDdxyShaderTest : public DrawElementsTestFunc {
#define V6 "gl_TexCoord[5]"
#define V7 "gl_TexCoord[6]"
#define V8 "gl_TexCoord[7]"
-#define DDX "dFdx"
-#define DDY "dFdy"
#else
#define V1 "v1"
#define V2 "v2"
@@ -40,8 +38,6 @@ class VaryingsAndDdxyShaderTest : public DrawElementsTestFunc {
#define V6 "v6"
#define V7 "v7"
#define V8 "v8"
-#define DDX "ddx"
-#define DDY "ddy"
#endif
@@ -158,15 +154,17 @@ GLuint VaryingsShaderProgram(int varyings_count, GLuint vertex_buffer) {
const char *fragment_shader_ddx =
+"#extension GL_OES_standard_derivatives : enable\n"
"varying vec4 v1;"
"void main() {"
-" gl_FragColor = vec4(" DDX "(" V1 ".x), 0., 0., 1.);"
+" gl_FragColor = vec4(dFdx(" V1 ".x), 0., 0., 1.);"
"}";
const char *fragment_shader_ddy =
+"#extension GL_OES_standard_derivatives : enable\n"
"varying vec4 v1;"
"void main() {"
-" gl_FragColor = vec4(" DDY "(" V1 ".y), 0., 0., 1.);"
+" gl_FragColor = vec4(dFdy(" V1 ".y), 0., 0., 1.);"
"}";
GLuint DdxDdyShaderProgram(bool ddx, GLuint vertex_buffer) {
« no previous file with comments | « client/deps/glbench/src/utils.h ('k') | client/deps/glbench/src/windowmanagercompositingtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698