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

Side by Side Diff: gpu/command_buffer/service/context_state_impl_autogen.h

Issue 15792007: gpu: Autogenerate glHint state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // DO NOT EDIT! 7 // DO NOT EDIT!
8 8
9 // It is included by context_state.cc 9 // It is included by context_state.cc
10 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ 10 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 color_mask_red = true; 42 color_mask_red = true;
43 color_mask_green = true; 43 color_mask_green = true;
44 color_mask_blue = true; 44 color_mask_blue = true;
45 color_mask_alpha = true; 45 color_mask_alpha = true;
46 cull_mode = GL_BACK; 46 cull_mode = GL_BACK;
47 depth_func = GL_LESS; 47 depth_func = GL_LESS;
48 depth_mask = true; 48 depth_mask = true;
49 z_near = 0.0f; 49 z_near = 0.0f;
50 z_far = 1.0f; 50 z_far = 1.0f;
51 front_face = GL_CCW; 51 front_face = GL_CCW;
52 hint_generate_mipmap = GL_DONT_CARE;
53 hint_fragment_shader_derivative = GL_DONT_CARE;
52 line_width = 1.0f; 54 line_width = 1.0f;
53 polygon_offset_factor = 0.0f; 55 polygon_offset_factor = 0.0f;
54 polygon_offset_units = 0.0f; 56 polygon_offset_units = 0.0f;
55 sample_coverage_value = 1.0f; 57 sample_coverage_value = 1.0f;
56 sample_coverage_invert = false; 58 sample_coverage_invert = false;
57 scissor_x = 0; 59 scissor_x = 0;
58 scissor_y = 0; 60 scissor_y = 0;
59 scissor_width = 1; 61 scissor_width = 1;
60 scissor_height = 1; 62 scissor_height = 1;
61 stencil_front_func = GL_ALWAYS; 63 stencil_front_func = GL_ALWAYS;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 color_clear_red, color_clear_green, color_clear_blue, color_clear_alpha); 103 color_clear_red, color_clear_green, color_clear_blue, color_clear_alpha);
102 glClearDepth(depth_clear); 104 glClearDepth(depth_clear);
103 glClearStencil(stencil_clear); 105 glClearStencil(stencil_clear);
104 glColorMask( 106 glColorMask(
105 color_mask_red, color_mask_green, color_mask_blue, color_mask_alpha); 107 color_mask_red, color_mask_green, color_mask_blue, color_mask_alpha);
106 glCullFace(cull_mode); 108 glCullFace(cull_mode);
107 glDepthFunc(depth_func); 109 glDepthFunc(depth_func);
108 glDepthMask(depth_mask); 110 glDepthMask(depth_mask);
109 glDepthRange(z_near, z_far); 111 glDepthRange(z_near, z_far);
110 glFrontFace(front_face); 112 glFrontFace(front_face);
113 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap);
114 glHint(
greggman 2013/05/30 17:15:24 You can't init state that is dependent on extensio
Sami 2013/05/30 18:59:45 Done.
115 GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, hint_fragment_shader_derivative);
111 glLineWidth(line_width); 116 glLineWidth(line_width);
112 glPolygonOffset(polygon_offset_factor, polygon_offset_units); 117 glPolygonOffset(polygon_offset_factor, polygon_offset_units);
113 glSampleCoverage(sample_coverage_value, sample_coverage_invert); 118 glSampleCoverage(sample_coverage_value, sample_coverage_invert);
114 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); 119 glScissor(scissor_x, scissor_y, scissor_width, scissor_height);
115 glStencilFuncSeparate( 120 glStencilFuncSeparate(
116 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); 121 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask);
117 glStencilFuncSeparate( 122 glStencilFuncSeparate(
118 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); 123 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask);
119 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); 124 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask);
120 glStencilMaskSeparate(GL_BACK, stencil_back_writemask); 125 glStencilMaskSeparate(GL_BACK, stencil_back_writemask);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 params[2] = static_cast<GLint>(blend_color_blue); 207 params[2] = static_cast<GLint>(blend_color_blue);
203 params[3] = static_cast<GLint>(blend_color_alpha); 208 params[3] = static_cast<GLint>(blend_color_alpha);
204 } 209 }
205 return true; 210 return true;
206 case GL_STENCIL_CLEAR_VALUE: 211 case GL_STENCIL_CLEAR_VALUE:
207 *num_written = 1; 212 *num_written = 1;
208 if (params) { 213 if (params) {
209 params[0] = static_cast<GLint>(stencil_clear); 214 params[0] = static_cast<GLint>(stencil_clear);
210 } 215 }
211 return true; 216 return true;
217 case GL_GENERATE_MIPMAP_HINT:
218 *num_written = 1;
219 if (params) {
220 params[0] = static_cast<GLint>(hint_generate_mipmap);
221 }
222 return true;
223 case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES:
224 *num_written = 1;
225 if (params) {
226 params[0] = static_cast<GLint>(hint_fragment_shader_derivative);
227 }
228 return true;
212 case GL_COLOR_WRITEMASK: 229 case GL_COLOR_WRITEMASK:
213 *num_written = 4; 230 *num_written = 4;
214 if (params) { 231 if (params) {
215 params[0] = static_cast<GLint>(color_mask_red); 232 params[0] = static_cast<GLint>(color_mask_red);
216 params[1] = static_cast<GLint>(color_mask_green); 233 params[1] = static_cast<GLint>(color_mask_green);
217 params[2] = static_cast<GLint>(color_mask_blue); 234 params[2] = static_cast<GLint>(color_mask_blue);
218 params[3] = static_cast<GLint>(color_mask_alpha); 235 params[3] = static_cast<GLint>(color_mask_alpha);
219 } 236 }
220 return true; 237 return true;
221 case GL_COLOR_CLEAR_VALUE: 238 case GL_COLOR_CLEAR_VALUE:
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 params[2] = static_cast<GLfloat>(blend_color_blue); 519 params[2] = static_cast<GLfloat>(blend_color_blue);
503 params[3] = static_cast<GLfloat>(blend_color_alpha); 520 params[3] = static_cast<GLfloat>(blend_color_alpha);
504 } 521 }
505 return true; 522 return true;
506 case GL_STENCIL_CLEAR_VALUE: 523 case GL_STENCIL_CLEAR_VALUE:
507 *num_written = 1; 524 *num_written = 1;
508 if (params) { 525 if (params) {
509 params[0] = static_cast<GLfloat>(stencil_clear); 526 params[0] = static_cast<GLfloat>(stencil_clear);
510 } 527 }
511 return true; 528 return true;
529 case GL_GENERATE_MIPMAP_HINT:
530 *num_written = 1;
531 if (params) {
532 params[0] = static_cast<GLfloat>(hint_generate_mipmap);
533 }
534 return true;
535 case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES:
536 *num_written = 1;
537 if (params) {
538 params[0] = static_cast<GLfloat>(hint_fragment_shader_derivative);
539 }
540 return true;
512 case GL_COLOR_WRITEMASK: 541 case GL_COLOR_WRITEMASK:
513 *num_written = 4; 542 *num_written = 4;
514 if (params) { 543 if (params) {
515 params[0] = static_cast<GLfloat>(color_mask_red); 544 params[0] = static_cast<GLfloat>(color_mask_red);
516 params[1] = static_cast<GLfloat>(color_mask_green); 545 params[1] = static_cast<GLfloat>(color_mask_green);
517 params[2] = static_cast<GLfloat>(color_mask_blue); 546 params[2] = static_cast<GLfloat>(color_mask_blue);
518 params[3] = static_cast<GLfloat>(color_mask_alpha); 547 params[3] = static_cast<GLfloat>(color_mask_alpha);
519 } 548 }
520 return true; 549 return true;
521 case GL_COLOR_CLEAR_VALUE: 550 case GL_COLOR_CLEAR_VALUE:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (params) { 776 if (params) {
748 params[0] = static_cast<GLfloat>(enable_flags.stencil_test); 777 params[0] = static_cast<GLfloat>(enable_flags.stencil_test);
749 } 778 }
750 return true; 779 return true;
751 default: 780 default:
752 return false; 781 return false;
753 } 782 }
754 } 783 }
755 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ 784 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_
756 785
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698