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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1160863007: DCHECK if shader compilation fails that it's due to context loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: glhelperlost: commentintxt Created 5 years, 6 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/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 7708bc129c7aec036cc6186e7ab3d128beec0a79..ca837b3c65584a7c1209cc8be6c914e839053691 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -4103,6 +4103,21 @@ void GLES2Implementation::GetVertexAttribIuiv(
CheckGLError();
}
+GLenum GLES2Implementation::GetGraphicsResetStatusKHR() {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetGraphicsResetStatusKHR()");
+ // If we can't make command buffers then the context is lost.
+ if (gpu_control_->IsGpuChannelLost())
+ return GL_UNKNOWN_CONTEXT_RESET_KHR;
+ // Otherwise, check the command buffer if it is lost.
+ if (helper_->IsContextLost()) {
+ // TODO(danakj): We could GetLastState() off the CommandBuffer and return
+ // the actual reason here if we cared to.
Ken Russell (switch to Gerrit) 2015/06/08 23:08:22 It's a little unfortunate that this can't return t
danakj 2015/06/08 23:09:37 Ya, that's why I left a todo so someone can track
+ return GL_UNKNOWN_CONTEXT_RESET_KHR;
+ }
+ return GL_NO_ERROR;
+}
+
void GLES2Implementation::Swap() {
SwapBuffers();
}
« no previous file with comments | « gpu/command_buffer/client/gles2_c_lib_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698