summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-01-18 19:40:31 +0000
committerEmil Velikov <[email protected]>2017-01-18 20:09:01 +0000
commit9f8dc3bf03ec825bae7041858dda6ca2e9a34363 (patch)
treeff9672995474d3c31f027fea8356cb5733e45388 /src/mesa/main
parentd1efa09d342bff3e5def2978a0bef748d74f9c82 (diff)
utils: build sha1/disk cache only with Android/Autoconf
Earlier commit imported a SHA1 implementation and relaxed the SHA1 and disk cache handling, broking the Windows builds. Restrict things for now until we get to a proper fix. Fixes: d1efa09d342 "util: import sha1 implementation from OpenBSD" Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shaderapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 96a4ce08349..4c67f9564ab 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1612,6 +1612,7 @@ _mesa_LinkProgram(GLuint programObj)
"glLinkProgram"));
}
+#ifdef ENABLE_SHADER_CACHE
/**
* Generate a SHA-1 hash value string for given source string.
*/
@@ -1723,6 +1724,8 @@ read_shader(const gl_shader_stage stage, const char *source)
return buffer;
}
+#endif /* ENABLE_SHADER_CACHE */
+
/**
* Called via glShaderSource() and glShaderSourceARB() API functions.
* Basically, concatenate the source code strings into one long string
@@ -1795,6 +1798,7 @@ _mesa_ShaderSource(GLuint shaderObj, GLsizei count,
source[totalLength - 1] = '\0';
source[totalLength - 2] = '\0';
+#ifdef ENABLE_SHADER_CACHE
/* Dump original shader source to MESA_SHADER_DUMP_PATH and replace
* if corresponding entry found from MESA_SHADER_READ_PATH.
*/
@@ -1805,6 +1809,7 @@ _mesa_ShaderSource(GLuint shaderObj, GLsizei count,
free(source);
source = replacement;
}
+#endif /* ENABLE_SHADER_CACHE */
shader_source(sh, source);