OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 depth_clear = 1.0f; | 58 depth_clear = 1.0f; |
59 stencil_clear = 0; | 59 stencil_clear = 0; |
60 color_mask_red = true; | 60 color_mask_red = true; |
61 cached_color_mask_red = true; | 61 cached_color_mask_red = true; |
62 color_mask_green = true; | 62 color_mask_green = true; |
63 cached_color_mask_green = true; | 63 cached_color_mask_green = true; |
64 color_mask_blue = true; | 64 color_mask_blue = true; |
65 cached_color_mask_blue = true; | 65 cached_color_mask_blue = true; |
66 color_mask_alpha = true; | 66 color_mask_alpha = true; |
67 cached_color_mask_alpha = true; | 67 cached_color_mask_alpha = true; |
| 68 coverage_modulation = GL_NONE; |
68 cull_mode = GL_BACK; | 69 cull_mode = GL_BACK; |
69 depth_func = GL_LESS; | 70 depth_func = GL_LESS; |
70 depth_mask = true; | 71 depth_mask = true; |
71 cached_depth_mask = true; | 72 cached_depth_mask = true; |
72 z_near = 0.0f; | 73 z_near = 0.0f; |
73 z_far = 1.0f; | 74 z_far = 1.0f; |
74 front_face = GL_CCW; | 75 front_face = GL_CCW; |
75 hint_generate_mipmap = GL_DONT_CARE; | 76 hint_generate_mipmap = GL_DONT_CARE; |
76 hint_fragment_shader_derivative = GL_DONT_CARE; | 77 hint_fragment_shader_derivative = GL_DONT_CARE; |
77 line_width = 1.0f; | 78 line_width = 1.0f; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 if ((depth_clear != prev_state->depth_clear)) | 268 if ((depth_clear != prev_state->depth_clear)) |
268 glClearDepth(depth_clear); | 269 glClearDepth(depth_clear); |
269 if ((stencil_clear != prev_state->stencil_clear)) | 270 if ((stencil_clear != prev_state->stencil_clear)) |
270 glClearStencil(stencil_clear); | 271 glClearStencil(stencil_clear); |
271 if ((cached_color_mask_red != prev_state->cached_color_mask_red) || | 272 if ((cached_color_mask_red != prev_state->cached_color_mask_red) || |
272 (cached_color_mask_green != prev_state->cached_color_mask_green) || | 273 (cached_color_mask_green != prev_state->cached_color_mask_green) || |
273 (cached_color_mask_blue != prev_state->cached_color_mask_blue) || | 274 (cached_color_mask_blue != prev_state->cached_color_mask_blue) || |
274 (cached_color_mask_alpha != prev_state->cached_color_mask_alpha)) | 275 (cached_color_mask_alpha != prev_state->cached_color_mask_alpha)) |
275 glColorMask(cached_color_mask_red, cached_color_mask_green, | 276 glColorMask(cached_color_mask_red, cached_color_mask_green, |
276 cached_color_mask_blue, cached_color_mask_alpha); | 277 cached_color_mask_blue, cached_color_mask_alpha); |
| 278 if (feature_info_->feature_flags().chromium_framebuffer_mixed_samples) |
| 279 if ((coverage_modulation != prev_state->coverage_modulation)) |
| 280 glCoverageModulationNV(coverage_modulation); |
277 if ((cull_mode != prev_state->cull_mode)) | 281 if ((cull_mode != prev_state->cull_mode)) |
278 glCullFace(cull_mode); | 282 glCullFace(cull_mode); |
279 if ((depth_func != prev_state->depth_func)) | 283 if ((depth_func != prev_state->depth_func)) |
280 glDepthFunc(depth_func); | 284 glDepthFunc(depth_func); |
281 if ((cached_depth_mask != prev_state->cached_depth_mask)) | 285 if ((cached_depth_mask != prev_state->cached_depth_mask)) |
282 glDepthMask(cached_depth_mask); | 286 glDepthMask(cached_depth_mask); |
283 if ((z_near != prev_state->z_near) || (z_far != prev_state->z_far)) | 287 if ((z_near != prev_state->z_near) || (z_far != prev_state->z_far)) |
284 glDepthRange(z_near, z_far); | 288 glDepthRange(z_near, z_far); |
285 if ((front_face != prev_state->front_face)) | 289 if ((front_face != prev_state->front_face)) |
286 glFrontFace(front_face); | 290 glFrontFace(front_face); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 blend_color_alpha); | 413 blend_color_alpha); |
410 glBlendEquationSeparate(blend_equation_rgb, blend_equation_alpha); | 414 glBlendEquationSeparate(blend_equation_rgb, blend_equation_alpha); |
411 glBlendFuncSeparate(blend_source_rgb, blend_dest_rgb, blend_source_alpha, | 415 glBlendFuncSeparate(blend_source_rgb, blend_dest_rgb, blend_source_alpha, |
412 blend_dest_alpha); | 416 blend_dest_alpha); |
413 glClearColor(color_clear_red, color_clear_green, color_clear_blue, | 417 glClearColor(color_clear_red, color_clear_green, color_clear_blue, |
414 color_clear_alpha); | 418 color_clear_alpha); |
415 glClearDepth(depth_clear); | 419 glClearDepth(depth_clear); |
416 glClearStencil(stencil_clear); | 420 glClearStencil(stencil_clear); |
417 glColorMask(cached_color_mask_red, cached_color_mask_green, | 421 glColorMask(cached_color_mask_red, cached_color_mask_green, |
418 cached_color_mask_blue, cached_color_mask_alpha); | 422 cached_color_mask_blue, cached_color_mask_alpha); |
| 423 if (feature_info_->feature_flags().chromium_framebuffer_mixed_samples) |
| 424 glCoverageModulationNV(coverage_modulation); |
419 glCullFace(cull_mode); | 425 glCullFace(cull_mode); |
420 glDepthFunc(depth_func); | 426 glDepthFunc(depth_func); |
421 glDepthMask(cached_depth_mask); | 427 glDepthMask(cached_depth_mask); |
422 glDepthRange(z_near, z_far); | 428 glDepthRange(z_near, z_far); |
423 glFrontFace(front_face); | 429 glFrontFace(front_face); |
424 if (!feature_info_->gl_version_info().is_desktop_core_profile) { | 430 if (!feature_info_->gl_version_info().is_desktop_core_profile) { |
425 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); | 431 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); |
426 } | 432 } |
427 if (feature_info_->feature_flags().oes_standard_derivatives) { | 433 if (feature_info_->feature_flags().oes_standard_derivatives) { |
428 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, | 434 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 return true; | 592 return true; |
587 case GL_COLOR_WRITEMASK: | 593 case GL_COLOR_WRITEMASK: |
588 *num_written = 4; | 594 *num_written = 4; |
589 if (params) { | 595 if (params) { |
590 params[0] = static_cast<GLint>(color_mask_red); | 596 params[0] = static_cast<GLint>(color_mask_red); |
591 params[1] = static_cast<GLint>(color_mask_green); | 597 params[1] = static_cast<GLint>(color_mask_green); |
592 params[2] = static_cast<GLint>(color_mask_blue); | 598 params[2] = static_cast<GLint>(color_mask_blue); |
593 params[3] = static_cast<GLint>(color_mask_alpha); | 599 params[3] = static_cast<GLint>(color_mask_alpha); |
594 } | 600 } |
595 return true; | 601 return true; |
| 602 case GL_COVERAGE_MODULATION_CHROMIUM: |
| 603 *num_written = 1; |
| 604 if (params) { |
| 605 params[0] = static_cast<GLint>(coverage_modulation); |
| 606 } |
| 607 return true; |
596 case GL_CULL_FACE_MODE: | 608 case GL_CULL_FACE_MODE: |
597 *num_written = 1; | 609 *num_written = 1; |
598 if (params) { | 610 if (params) { |
599 params[0] = static_cast<GLint>(cull_mode); | 611 params[0] = static_cast<GLint>(cull_mode); |
600 } | 612 } |
601 return true; | 613 return true; |
602 case GL_DEPTH_FUNC: | 614 case GL_DEPTH_FUNC: |
603 *num_written = 1; | 615 *num_written = 1; |
604 if (params) { | 616 if (params) { |
605 params[0] = static_cast<GLint>(depth_func); | 617 params[0] = static_cast<GLint>(depth_func); |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 return true; | 1030 return true; |
1019 case GL_COLOR_WRITEMASK: | 1031 case GL_COLOR_WRITEMASK: |
1020 *num_written = 4; | 1032 *num_written = 4; |
1021 if (params) { | 1033 if (params) { |
1022 params[0] = static_cast<GLfloat>(color_mask_red); | 1034 params[0] = static_cast<GLfloat>(color_mask_red); |
1023 params[1] = static_cast<GLfloat>(color_mask_green); | 1035 params[1] = static_cast<GLfloat>(color_mask_green); |
1024 params[2] = static_cast<GLfloat>(color_mask_blue); | 1036 params[2] = static_cast<GLfloat>(color_mask_blue); |
1025 params[3] = static_cast<GLfloat>(color_mask_alpha); | 1037 params[3] = static_cast<GLfloat>(color_mask_alpha); |
1026 } | 1038 } |
1027 return true; | 1039 return true; |
| 1040 case GL_COVERAGE_MODULATION_CHROMIUM: |
| 1041 *num_written = 1; |
| 1042 if (params) { |
| 1043 params[0] = static_cast<GLfloat>(coverage_modulation); |
| 1044 } |
| 1045 return true; |
1028 case GL_CULL_FACE_MODE: | 1046 case GL_CULL_FACE_MODE: |
1029 *num_written = 1; | 1047 *num_written = 1; |
1030 if (params) { | 1048 if (params) { |
1031 params[0] = static_cast<GLfloat>(cull_mode); | 1049 params[0] = static_cast<GLfloat>(cull_mode); |
1032 } | 1050 } |
1033 return true; | 1051 return true; |
1034 case GL_DEPTH_FUNC: | 1052 case GL_DEPTH_FUNC: |
1035 *num_written = 1; | 1053 *num_written = 1; |
1036 if (params) { | 1054 if (params) { |
1037 params[0] = static_cast<GLfloat>(depth_func); | 1055 params[0] = static_cast<GLfloat>(depth_func); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 *num_written = 1; | 1385 *num_written = 1; |
1368 if (params) { | 1386 if (params) { |
1369 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_one_ext); | 1387 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_one_ext); |
1370 } | 1388 } |
1371 return true; | 1389 return true; |
1372 default: | 1390 default: |
1373 return false; | 1391 return false; |
1374 } | 1392 } |
1375 } | 1393 } |
1376 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 1394 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
OLD | NEW |