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

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

Issue 1498033003: Implement SamplerManager in the command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unnessecary state initialization Created 5 years 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 | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index 44ad3199c1de5b3af3634baa38e2ad420d25b8f1..b93a37295dfb7664f83236529d4aa2f299e05af7 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -585,6 +585,15 @@ void ContextState::UnbindTexture(TextureRef* texture) {
}
}
+void ContextState::UnbindSampler(Sampler* sampler) {
+ for (size_t jj = 0; jj < sampler_units.size(); ++jj) {
+ if (sampler_units[jj].get() == sampler) {
+ sampler_units[jj] = nullptr;
+ glBindSampler(jj, 0);
+ }
+ }
+}
+
// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
// instead of having to edit some template or the code generator.
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698