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

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

Issue 308703010: Fix desynched GPU stencil mask cache values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting fix Created 6 years, 7 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 793606f951a86dcf5642eb26107a2f41db725984..19aadf286fa5b3efba8b72fa32c7eee092ff3bc8 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3069,7 +3069,8 @@ bool GLES2DecoderImpl::CheckFramebufferValid(
offscreen_target_color_format_) & 0x0008) != 0 ? 0 : 1);
state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glClearStencil(0);
- glStencilMask(-1);
+ state_.SetDeviceStencilMaskSeparate(GL_FRONT, -1);
+ state_.SetDeviceStencilMaskSeparate(GL_BACK, -1);
glClearDepth(1.0f);
state_.SetDeviceDepthMask(GL_TRUE);
state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
@@ -5032,7 +5033,8 @@ void GLES2DecoderImpl::ClearUnclearedAttachments(
if (framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT) ||
framebuffer->HasUnclearedAttachment(GL_DEPTH_STENCIL_ATTACHMENT)) {
glClearStencil(0);
- glStencilMask(-1);
+ state_.SetDeviceStencilMaskSeparate(GL_FRONT, -1);
+ state_.SetDeviceStencilMaskSeparate(GL_BACK, -1);
clear_bits |= GL_STENCIL_BUFFER_BIT;
}
@@ -7824,7 +7826,8 @@ bool GLES2DecoderImpl::ClearLevel(
return false;
}
glClearStencil(0);
- glStencilMask(-1);
+ state_.SetDeviceStencilMaskSeparate(GL_FRONT, -1);
+ state_.SetDeviceStencilMaskSeparate(GL_BACK, -1);
glClearDepth(1.0f);
state_.SetDeviceDepthMask(GL_TRUE);
state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false);
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698