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

Unified Diff: gpu/command_buffer/service/context_state_impl_autogen.h

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « gpu/command_buffer/service/context_state_autogen.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state_impl_autogen.h
diff --git a/gpu/command_buffer/service/context_state_impl_autogen.h b/gpu/command_buffer/service/context_state_impl_autogen.h
index 467f1cec7e18dcb1106df7257cb3c68dac25134d..61d9819490bd14e8a75f395f9085046ffa736f65 100644
--- a/gpu/command_buffer/service/context_state_impl_autogen.h
+++ b/gpu/command_buffer/service/context_state_impl_autogen.h
@@ -32,7 +32,9 @@ ContextState::EnableFlags::EnableFlags()
stencil_test(false),
cached_stencil_test(false),
rasterizer_discard(false),
- cached_rasterizer_discard(false) {
+ cached_rasterizer_discard(false),
+ primitive_restart_fixed_index(false),
+ cached_primitive_restart_fixed_index(false) {
}
void ContextState::Initialize() {
@@ -178,6 +180,11 @@ void ContextState::InitCapabilities(const ContextState* prev_state) const {
EnableDisable(GL_RASTERIZER_DISCARD,
enable_flags.cached_rasterizer_discard);
}
+ if (prev_state->enable_flags.cached_primitive_restart_fixed_index !=
+ enable_flags.cached_primitive_restart_fixed_index) {
+ EnableDisable(GL_PRIMITIVE_RESTART_FIXED_INDEX,
+ enable_flags.cached_primitive_restart_fixed_index);
+ }
}
} else {
EnableDisable(GL_BLEND, enable_flags.cached_blend);
@@ -194,6 +201,8 @@ void ContextState::InitCapabilities(const ContextState* prev_state) const {
if (feature_info_->IsES3Capable()) {
EnableDisable(GL_RASTERIZER_DISCARD,
enable_flags.cached_rasterizer_discard);
+ EnableDisable(GL_PRIMITIVE_RESTART_FIXED_INDEX,
+ enable_flags.cached_primitive_restart_fixed_index);
}
}
}
@@ -382,6 +391,8 @@ bool ContextState::GetEnabled(GLenum cap) const {
return enable_flags.stencil_test;
case GL_RASTERIZER_DISCARD:
return enable_flags.rasterizer_discard;
+ case GL_PRIMITIVE_RESTART_FIXED_INDEX:
+ return enable_flags.primitive_restart_fixed_index;
default:
NOTREACHED();
return false;
@@ -730,6 +741,13 @@ bool ContextState::GetStateAsGLint(GLenum pname,
params[0] = static_cast<GLint>(enable_flags.rasterizer_discard);
}
return true;
+ case GL_PRIMITIVE_RESTART_FIXED_INDEX:
+ *num_written = 1;
+ if (params) {
+ params[0] =
+ static_cast<GLint>(enable_flags.primitive_restart_fixed_index);
+ }
+ return true;
default:
return false;
}
@@ -1073,6 +1091,13 @@ bool ContextState::GetStateAsGLfloat(GLenum pname,
params[0] = static_cast<GLfloat>(enable_flags.rasterizer_discard);
}
return true;
+ case GL_PRIMITIVE_RESTART_FIXED_INDEX:
+ *num_written = 1;
+ if (params) {
+ params[0] =
+ static_cast<GLfloat>(enable_flags.primitive_restart_fixed_index);
+ }
+ return true;
default:
return false;
}
« no previous file with comments | « gpu/command_buffer/service/context_state_autogen.h ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698