Chromium Code Reviews| 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 037ac6c1a0bd96d1b767158e35d498cd77155cb3..0616ba8163501082325df640bc69dab759d9148a 100644 |
| --- a/gpu/command_buffer/service/context_state_impl_autogen.h |
| +++ b/gpu/command_buffer/service/context_state_impl_autogen.h |
| @@ -30,7 +30,11 @@ ContextState::EnableFlags::EnableFlags() |
| scissor_test(false), |
| cached_scissor_test(false), |
| stencil_test(false), |
| - cached_stencil_test(false) { |
| + cached_stencil_test(false), |
| + primitive_restart_fixed_index(false), |
| + cached_primitive_restart_fixed_index(false), |
| + rasterizer_discard(false), |
| + cached_rasterizer_discard(false) { |
| } |
| void ContextState::Initialize() { |
| @@ -161,6 +165,14 @@ void ContextState::InitCapabilities(const ContextState* prev_state) const { |
| if (prev_state->enable_flags.cached_stencil_test != |
| enable_flags.cached_stencil_test) |
| EnableDisable(GL_STENCIL_TEST, enable_flags.cached_stencil_test); |
| + 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); |
| + if (prev_state->enable_flags.cached_rasterizer_discard != |
| + enable_flags.cached_rasterizer_discard) |
| + EnableDisable(GL_RASTERIZER_DISCARD, |
| + enable_flags.cached_rasterizer_discard); |
| } else { |
| EnableDisable(GL_BLEND, enable_flags.cached_blend); |
| EnableDisable(GL_CULL_FACE, enable_flags.cached_cull_face); |
| @@ -173,6 +185,10 @@ void ContextState::InitCapabilities(const ContextState* prev_state) const { |
| EnableDisable(GL_SAMPLE_COVERAGE, enable_flags.cached_sample_coverage); |
| EnableDisable(GL_SCISSOR_TEST, enable_flags.cached_scissor_test); |
| EnableDisable(GL_STENCIL_TEST, enable_flags.cached_stencil_test); |
| + EnableDisable(GL_PRIMITIVE_RESTART_FIXED_INDEX, |
| + enable_flags.cached_primitive_restart_fixed_index); |
| + EnableDisable(GL_RASTERIZER_DISCARD, |
| + enable_flags.cached_rasterizer_discard); |
|
piman
2015/03/10 22:54:46
We shouldn't call glEnable/glDisable with es3 enum
|
| } |
| } |
| @@ -358,6 +374,10 @@ bool ContextState::GetEnabled(GLenum cap) const { |
| return enable_flags.scissor_test; |
| case GL_STENCIL_TEST: |
| return enable_flags.stencil_test; |
| + case GL_PRIMITIVE_RESTART_FIXED_INDEX: |
| + return enable_flags.primitive_restart_fixed_index; |
| + case GL_RASTERIZER_DISCARD: |
| + return enable_flags.rasterizer_discard; |
| default: |
| NOTREACHED(); |
| return false; |
| @@ -700,6 +720,19 @@ bool ContextState::GetStateAsGLint(GLenum pname, |
| params[0] = static_cast<GLint>(enable_flags.stencil_test); |
| } |
| 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; |
| + case GL_RASTERIZER_DISCARD: |
| + *num_written = 1; |
| + if (params) { |
| + params[0] = static_cast<GLint>(enable_flags.rasterizer_discard); |
| + } |
| + return true; |
| default: |
| return false; |
| } |
| @@ -1037,6 +1070,19 @@ bool ContextState::GetStateAsGLfloat(GLenum pname, |
| params[0] = static_cast<GLfloat>(enable_flags.stencil_test); |
| } |
| 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; |
| + case GL_RASTERIZER_DISCARD: |
| + *num_written = 1; |
| + if (params) { |
| + params[0] = static_cast<GLfloat>(enable_flags.rasterizer_discard); |
| + } |
| + return true; |
| default: |
| return false; |
| } |