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

Unified Diff: gpu/command_buffer/service/memory_program_cache.cc

Issue 2615573002: Add disable_program_caching_for_transform_feedback workaround. (Closed)
Patch Set: Created 3 years, 11 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
Index: gpu/command_buffer/service/memory_program_cache.cc
diff --git a/gpu/command_buffer/service/memory_program_cache.cc b/gpu/command_buffer/service/memory_program_cache.cc
index c38fd78edb057547680a0d123e4ff9e3a6afbd81..410914db2b0d1941ee209ce27d7b5d721077aadc 100644
--- a/gpu/command_buffer/service/memory_program_cache.cc
+++ b/gpu/command_buffer/service/memory_program_cache.cc
@@ -202,10 +202,14 @@ void RunShaderCallback(const ShaderCacheCallback& callback,
} // namespace
-MemoryProgramCache::MemoryProgramCache(size_t max_cache_size_bytes,
- bool disable_gpu_shader_disk_cache)
+MemoryProgramCache::MemoryProgramCache(
+ size_t max_cache_size_bytes,
+ bool disable_gpu_shader_disk_cache,
+ bool disable_program_caching_for_transform_feedback)
: max_size_bytes_(max_cache_size_bytes),
disable_gpu_shader_disk_cache_(disable_gpu_shader_disk_cache),
+ disable_program_caching_for_transform_feedback_(
+ disable_program_caching_for_transform_feedback),
curr_size_bytes_(0),
store_(ProgramMRUCache::NO_AUTO_EVICT) {
}
@@ -291,6 +295,10 @@ void MemoryProgramCache::SaveLinkedProgram(
const std::vector<std::string>& transform_feedback_varyings,
GLenum transform_feedback_buffer_mode,
const ShaderCacheCallback& shader_callback) {
+ if (disable_program_caching_for_transform_feedback_ &&
+ !transform_feedback_varyings.empty()) {
+ return;
+ }
GLenum format;
GLsizei length = 0;
glGetProgramiv(program, GL_PROGRAM_BINARY_LENGTH_OES, &length);
« no previous file with comments | « gpu/command_buffer/service/memory_program_cache.h ('k') | gpu/command_buffer/service/memory_program_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698