[Mesa-dev] [PATCH 74/87] glsl: enable shader cache for tess stages
Timothy Arceri
timothy.arceri at collabora.com
Wed Jul 13 02:48:09 UTC 2016
---
src/compiler/glsl/shader_cache.cpp | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 0c56587..9b958a0 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1091,12 +1091,8 @@ shader_cache_write_program_metadata(struct gl_context *ctx,
if (!cache)
return;
- /* We should be able to serialize any valid combinations of shaders, but
- * for now we only support vs and fs.
- */
- if (prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ||
- prog->_LinkedShaders[MESA_SHADER_TESS_CTRL] ||
- prog->_LinkedShaders[MESA_SHADER_COMPUTE])
+ /* Currently we don't support caching compute shaders. */
+ if (prog->_LinkedShaders[MESA_SHADER_COMPUTE])
return;
metadata = blob_create(NULL);
@@ -1157,9 +1153,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
return false;
for (unsigned i = 0; i < prog->NumShaders; i++) {
- if (prog->Shaders[i]->Stage != MESA_SHADER_VERTEX &&
- prog->Shaders[i]->Stage != MESA_SHADER_GEOMETRY &&
- prog->Shaders[i]->Stage != MESA_SHADER_FRAGMENT) {
+ if (prog->Shaders[i]->Stage == MESA_SHADER_COMPUTE) {
compile_shaders(ctx, prog);
return false;
}
--
2.7.4
More information about the mesa-dev
mailing list