summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/context_state_impl_autogen.h
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 04:51:06 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 04:51:06 +0000
commit0e02048933cc0cf7bb62d518414ca142c5a11f07 (patch)
treeb28b312feffd00f5ca6392ff0c69d256b4a6c958 /gpu/command_buffer/service/context_state_impl_autogen.h
parentaa6ad80334e4262b860fb3dd31f3fccc54b42b65 (diff)
downloadchromium_src-0e02048933cc0cf7bb62d518414ca142c5a11f07.zip
chromium_src-0e02048933cc0cf7bb62d518414ca142c5a11f07.tar.gz
chromium_src-0e02048933cc0cf7bb62d518414ca142c5a11f07.tar.bz2
Revert 168165 - Revert "Revert 167613 - Cache more GL state both service and client side."
This reverts commit 14efc6d257c73271ae0b70d2e71571b335827570. The issue appears to be that glBlitFramebufferANGLE fails if GL_SCISSOR_TEST is enabled and the caching code ends up enabling it places it didn't use to be. That doesn't explain issues on non-Windows machines though. It disable before glBlitFramebufferANGLE and glBlitFramebufferEXT on all machines at the moment. I tried to get the code to fail on Linux NVidia both debug and release and Mac Retina both debug and release and using integrated and discrete but no luck. AFAICT there's no try bots to test Linux Intel or Mac Intel so if this still causes tests to fail feel free to revert it TBR=apatrick@chromium.org,brettw@chromium.org R=shawnsingh@chromium.org BUG=160370 Review URL: https://chromiumcodereview.appspot.com/11415003 TBR=gman@chromium.org Review URL: https://codereview.chromium.org/11280110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/context_state_impl_autogen.h')
-rw-r--r--gpu/command_buffer/service/context_state_impl_autogen.h626
1 files changed, 0 insertions, 626 deletions
diff --git a/gpu/command_buffer/service/context_state_impl_autogen.h b/gpu/command_buffer/service/context_state_impl_autogen.h
index 5342435..c33cb7f 100644
--- a/gpu/command_buffer/service/context_state_impl_autogen.h
+++ b/gpu/command_buffer/service/context_state_impl_autogen.h
@@ -126,631 +126,5 @@ void ContextState::InitState() const {
stencil_back_z_pass_op);
glViewport(viewport_x, viewport_y, viewport_width, viewport_height);
}
-bool ContextState::GetEnabled(GLenum cap) const {
- switch (cap) {
- case GL_BLEND:
- return enable_flags.blend;
- case GL_CULL_FACE:
- return enable_flags.cull_face;
- case GL_DEPTH_TEST:
- return enable_flags.depth_test;
- case GL_DITHER:
- return enable_flags.dither;
- case GL_POLYGON_OFFSET_FILL:
- return enable_flags.polygon_offset_fill;
- case GL_SAMPLE_ALPHA_TO_COVERAGE:
- return enable_flags.sample_alpha_to_coverage;
- case GL_SAMPLE_COVERAGE:
- return enable_flags.sample_coverage;
- case GL_SCISSOR_TEST:
- return enable_flags.scissor_test;
- case GL_STENCIL_TEST:
- return enable_flags.stencil_test;
- default:
- GPU_NOTREACHED();
- return false;
- }
-}
-
-bool ContextState::GetStateAsGLint(
- GLenum pname, GLint* params, GLsizei* num_written) const {
- switch (pname) {
- case GL_VIEWPORT:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLint>(viewport_x);
- params[1] = static_cast<GLint>(viewport_y);
- params[2] = static_cast<GLint>(viewport_width);
- params[3] = static_cast<GLint>(viewport_height);
- }
- return true;
- case GL_BLEND_SRC_RGB:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(blend_source_rgb);
- }
- return true;
- case GL_BLEND_DST_RGB:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(blend_dest_rgb);
- }
- return true;
- case GL_BLEND_SRC_ALPHA:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(blend_source_alpha);
- }
- return true;
- case GL_BLEND_DST_ALPHA:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(blend_dest_alpha);
- }
- return true;
- case GL_LINE_WIDTH:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(line_width);
- }
- return true;
- case GL_BLEND_COLOR:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLint>(blend_color_red);
- params[1] = static_cast<GLint>(blend_color_green);
- params[2] = static_cast<GLint>(blend_color_blue);
- params[3] = static_cast<GLint>(blend_color_alpha);
- }
- return true;
- case GL_STENCIL_CLEAR_VALUE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_clear);
- }
- return true;
- case GL_COLOR_WRITEMASK:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLint>(color_mask_red);
- params[1] = static_cast<GLint>(color_mask_green);
- params[2] = static_cast<GLint>(color_mask_blue);
- params[3] = static_cast<GLint>(color_mask_alpha);
- }
- return true;
- case GL_COLOR_CLEAR_VALUE:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLint>(color_clear_red);
- params[1] = static_cast<GLint>(color_clear_green);
- params[2] = static_cast<GLint>(color_clear_blue);
- params[3] = static_cast<GLint>(color_clear_alpha);
- }
- return true;
- case GL_DEPTH_RANGE:
- *num_written = 2;
- if (params) {
- params[0] = static_cast<GLint>(z_near);
- params[1] = static_cast<GLint>(z_far);
- }
- return true;
- case GL_DEPTH_CLEAR_VALUE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(depth_clear);
- }
- return true;
- case GL_STENCIL_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_fail_op);
- }
- return true;
- case GL_STENCIL_PASS_DEPTH_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_z_fail_op);
- }
- return true;
- case GL_STENCIL_PASS_DEPTH_PASS:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_z_pass_op);
- }
- return true;
- case GL_STENCIL_BACK_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_fail_op);
- }
- return true;
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_z_fail_op);
- }
- return true;
- case GL_STENCIL_BACK_PASS_DEPTH_PASS:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_z_pass_op);
- }
- return true;
- case GL_SCISSOR_BOX:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLint>(scissor_x);
- params[1] = static_cast<GLint>(scissor_y);
- params[2] = static_cast<GLint>(scissor_width);
- params[3] = static_cast<GLint>(scissor_height);
- }
- return true;
- case GL_FRONT_FACE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(front_face);
- }
- return true;
- case GL_SAMPLE_COVERAGE_VALUE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(sample_coverage_value);
- }
- return true;
- case GL_SAMPLE_COVERAGE_INVERT:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(sample_coverage_invert);
- }
- return true;
- case GL_POLYGON_OFFSET_FACTOR:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(polygon_offset_factor);
- }
- return true;
- case GL_POLYGON_OFFSET_UNITS:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(polygon_offset_units);
- }
- return true;
- case GL_CULL_FACE_MODE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(cull_mode);
- }
- return true;
- case GL_DEPTH_FUNC:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(depth_func);
- }
- return true;
- case GL_STENCIL_FUNC:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_func);
- }
- return true;
- case GL_STENCIL_REF:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_ref);
- }
- return true;
- case GL_STENCIL_VALUE_MASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_mask);
- }
- return true;
- case GL_STENCIL_BACK_FUNC:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_func);
- }
- return true;
- case GL_STENCIL_BACK_REF:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_ref);
- }
- return true;
- case GL_STENCIL_BACK_VALUE_MASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_mask);
- }
- return true;
- case GL_DEPTH_WRITEMASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(depth_mask);
- }
- return true;
- case GL_BLEND_EQUATION_RGB:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(blend_equation_rgb);
- }
- return true;
- case GL_BLEND_EQUATION_ALPHA:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(blend_equation_alpha);
- }
- return true;
- case GL_STENCIL_WRITEMASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_front_writemask);
- }
- return true;
- case GL_STENCIL_BACK_WRITEMASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(stencil_back_writemask);
- }
- return true;
- case GL_BLEND:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.blend);
- }
- return true;
- case GL_CULL_FACE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.cull_face);
- }
- return true;
- case GL_DEPTH_TEST:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.depth_test);
- }
- return true;
- case GL_DITHER:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.dither);
- }
- return true;
- case GL_POLYGON_OFFSET_FILL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.polygon_offset_fill);
- }
- return true;
- case GL_SAMPLE_ALPHA_TO_COVERAGE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.sample_alpha_to_coverage);
- }
- return true;
- case GL_SAMPLE_COVERAGE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.sample_coverage);
- }
- return true;
- case GL_SCISSOR_TEST:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.scissor_test);
- }
- return true;
- case GL_STENCIL_TEST:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLint>(enable_flags.stencil_test);
- }
- return true;
- default:
- return false;
- }
-}
-
-bool ContextState::GetStateAsGLfloat(
- GLenum pname, GLfloat* params, GLsizei* num_written) const {
- switch (pname) {
- case GL_VIEWPORT:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLfloat>(viewport_x);
- params[1] = static_cast<GLfloat>(viewport_y);
- params[2] = static_cast<GLfloat>(viewport_width);
- params[3] = static_cast<GLfloat>(viewport_height);
- }
- return true;
- case GL_BLEND_SRC_RGB:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_source_rgb);
- }
- return true;
- case GL_BLEND_DST_RGB:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_dest_rgb);
- }
- return true;
- case GL_BLEND_SRC_ALPHA:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_source_alpha);
- }
- return true;
- case GL_BLEND_DST_ALPHA:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_dest_alpha);
- }
- return true;
- case GL_LINE_WIDTH:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(line_width);
- }
- return true;
- case GL_BLEND_COLOR:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_color_red);
- params[1] = static_cast<GLfloat>(blend_color_green);
- params[2] = static_cast<GLfloat>(blend_color_blue);
- params[3] = static_cast<GLfloat>(blend_color_alpha);
- }
- return true;
- case GL_STENCIL_CLEAR_VALUE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_clear);
- }
- return true;
- case GL_COLOR_WRITEMASK:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLfloat>(color_mask_red);
- params[1] = static_cast<GLfloat>(color_mask_green);
- params[2] = static_cast<GLfloat>(color_mask_blue);
- params[3] = static_cast<GLfloat>(color_mask_alpha);
- }
- return true;
- case GL_COLOR_CLEAR_VALUE:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLfloat>(color_clear_red);
- params[1] = static_cast<GLfloat>(color_clear_green);
- params[2] = static_cast<GLfloat>(color_clear_blue);
- params[3] = static_cast<GLfloat>(color_clear_alpha);
- }
- return true;
- case GL_DEPTH_RANGE:
- *num_written = 2;
- if (params) {
- params[0] = static_cast<GLfloat>(z_near);
- params[1] = static_cast<GLfloat>(z_far);
- }
- return true;
- case GL_DEPTH_CLEAR_VALUE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(depth_clear);
- }
- return true;
- case GL_STENCIL_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_fail_op);
- }
- return true;
- case GL_STENCIL_PASS_DEPTH_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_z_fail_op);
- }
- return true;
- case GL_STENCIL_PASS_DEPTH_PASS:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_z_pass_op);
- }
- return true;
- case GL_STENCIL_BACK_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_fail_op);
- }
- return true;
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_z_fail_op);
- }
- return true;
- case GL_STENCIL_BACK_PASS_DEPTH_PASS:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_z_pass_op);
- }
- return true;
- case GL_SCISSOR_BOX:
- *num_written = 4;
- if (params) {
- params[0] = static_cast<GLfloat>(scissor_x);
- params[1] = static_cast<GLfloat>(scissor_y);
- params[2] = static_cast<GLfloat>(scissor_width);
- params[3] = static_cast<GLfloat>(scissor_height);
- }
- return true;
- case GL_FRONT_FACE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(front_face);
- }
- return true;
- case GL_SAMPLE_COVERAGE_VALUE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(sample_coverage_value);
- }
- return true;
- case GL_SAMPLE_COVERAGE_INVERT:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(sample_coverage_invert);
- }
- return true;
- case GL_POLYGON_OFFSET_FACTOR:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(polygon_offset_factor);
- }
- return true;
- case GL_POLYGON_OFFSET_UNITS:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(polygon_offset_units);
- }
- return true;
- case GL_CULL_FACE_MODE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(cull_mode);
- }
- return true;
- case GL_DEPTH_FUNC:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(depth_func);
- }
- return true;
- case GL_STENCIL_FUNC:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_func);
- }
- return true;
- case GL_STENCIL_REF:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_ref);
- }
- return true;
- case GL_STENCIL_VALUE_MASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_mask);
- }
- return true;
- case GL_STENCIL_BACK_FUNC:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_func);
- }
- return true;
- case GL_STENCIL_BACK_REF:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_ref);
- }
- return true;
- case GL_STENCIL_BACK_VALUE_MASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_mask);
- }
- return true;
- case GL_DEPTH_WRITEMASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(depth_mask);
- }
- return true;
- case GL_BLEND_EQUATION_RGB:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_equation_rgb);
- }
- return true;
- case GL_BLEND_EQUATION_ALPHA:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(blend_equation_alpha);
- }
- return true;
- case GL_STENCIL_WRITEMASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_front_writemask);
- }
- return true;
- case GL_STENCIL_BACK_WRITEMASK:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(stencil_back_writemask);
- }
- return true;
- case GL_BLEND:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.blend);
- }
- return true;
- case GL_CULL_FACE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.cull_face);
- }
- return true;
- case GL_DEPTH_TEST:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.depth_test);
- }
- return true;
- case GL_DITHER:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.dither);
- }
- return true;
- case GL_POLYGON_OFFSET_FILL:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.polygon_offset_fill);
- }
- return true;
- case GL_SAMPLE_ALPHA_TO_COVERAGE:
- *num_written = 1;
- if (params) {
- params[0] =
- static_cast<GLfloat>(enable_flags.sample_alpha_to_coverage);
- }
- return true;
- case GL_SAMPLE_COVERAGE:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.sample_coverage);
- }
- return true;
- case GL_SCISSOR_TEST:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.scissor_test);
- }
- return true;
- case GL_STENCIL_TEST:
- *num_written = 1;
- if (params) {
- params[0] = static_cast<GLfloat>(enable_flags.stencil_test);
- }
- return true;
- default:
- return false;
- }
-}
#endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_