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

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

Issue 1822643002: [Command buffer] Enable primitive restart for WebGL 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix coding style and update webgl2_conformance_expectations.py Created 4 years, 9 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/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index 85cde3bfab3297f1782f67c74860de1c61d7c6cf..f91e8ccb9b1582e805a0ce9986b3954ba9768d96 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -434,9 +434,10 @@ ErrorState* ContextState::GetErrorState() {
}
void ContextState::EnableDisable(GLenum pname, bool enable) const {
- if (pname == GL_PRIMITIVE_RESTART_FIXED_INDEX) {
- if (feature_info_->feature_flags().emulate_primitive_restart_fixed_index)
- pname = GL_PRIMITIVE_RESTART;
+ if (pname == GL_PRIMITIVE_RESTART_FIXED_INDEX &&
+ feature_info_->feature_flags().emulate_primitive_restart_fixed_index) {
+ // GLES2DecoderImpl::DoDrawElements can handle this situation
+ return;
}
if (enable) {
glEnable(pname);
« no previous file with comments | « gpu/command_buffer/service/buffer_manager_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698