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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 projection_matrix[11] = 0.0f; | 101 projection_matrix[11] = 0.0f; |
102 projection_matrix[12] = 0.0f; | 102 projection_matrix[12] = 0.0f; |
103 projection_matrix[13] = 0.0f; | 103 projection_matrix[13] = 0.0f; |
104 projection_matrix[14] = 0.0f; | 104 projection_matrix[14] = 0.0f; |
105 projection_matrix[15] = 1.0f; | 105 projection_matrix[15] = 1.0f; |
106 stencil_path_func = GL_ALWAYS; | 106 stencil_path_func = GL_ALWAYS; |
107 stencil_path_ref = 0; | 107 stencil_path_ref = 0; |
108 stencil_path_mask = 0xFFFFFFFFU; | 108 stencil_path_mask = 0xFFFFFFFFU; |
109 pack_alignment = 4; | 109 pack_alignment = 4; |
110 unpack_alignment = 4; | 110 unpack_alignment = 4; |
111 pack_row_length = 0; | |
112 pack_skip_pixels = 0; | |
113 pack_skip_rows = 0; | |
114 unpack_row_length = 0; | |
115 unpack_image_height = 0; | |
116 unpack_skip_pixels = 0; | |
117 unpack_skip_rows = 0; | |
118 unpack_skip_images = 0; | |
119 polygon_offset_factor = 0.0f; | 111 polygon_offset_factor = 0.0f; |
120 polygon_offset_units = 0.0f; | 112 polygon_offset_units = 0.0f; |
121 sample_coverage_value = 1.0f; | 113 sample_coverage_value = 1.0f; |
122 sample_coverage_invert = false; | 114 sample_coverage_invert = false; |
123 scissor_x = 0; | 115 scissor_x = 0; |
124 scissor_y = 0; | 116 scissor_y = 0; |
125 scissor_width = 1; | 117 scissor_width = 1; |
126 scissor_height = 1; | 118 scissor_height = 1; |
127 stencil_front_func = GL_ALWAYS; | 119 stencil_front_func = GL_ALWAYS; |
128 stencil_front_ref = 0; | 120 stencil_front_ref = 0; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 (stencil_path_ref != prev_state->stencil_path_ref) || | 283 (stencil_path_ref != prev_state->stencil_path_ref) || |
292 (stencil_path_mask != prev_state->stencil_path_mask)) | 284 (stencil_path_mask != prev_state->stencil_path_mask)) |
293 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, | 285 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, |
294 stencil_path_mask); | 286 stencil_path_mask); |
295 if (prev_state->pack_alignment != pack_alignment) { | 287 if (prev_state->pack_alignment != pack_alignment) { |
296 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); | 288 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); |
297 } | 289 } |
298 if (prev_state->unpack_alignment != unpack_alignment) { | 290 if (prev_state->unpack_alignment != unpack_alignment) { |
299 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); | 291 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); |
300 } | 292 } |
301 if (feature_info_->IsES3Capable()) { | |
302 if (prev_state->pack_row_length != pack_row_length) { | |
303 glPixelStorei(GL_PACK_ROW_LENGTH, pack_row_length); | |
304 } | |
305 } | |
306 if (feature_info_->IsES3Capable()) { | |
307 if (prev_state->pack_skip_pixels != pack_skip_pixels) { | |
308 glPixelStorei(GL_PACK_SKIP_PIXELS, pack_skip_pixels); | |
309 } | |
310 } | |
311 if (feature_info_->IsES3Capable()) { | |
312 if (prev_state->pack_skip_rows != pack_skip_rows) { | |
313 glPixelStorei(GL_PACK_SKIP_ROWS, pack_skip_rows); | |
314 } | |
315 } | |
316 if (feature_info_->IsES3Capable()) { | |
317 if (prev_state->unpack_row_length != unpack_row_length) { | |
318 glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length); | |
319 } | |
320 } | |
321 if (feature_info_->IsES3Capable()) { | |
322 if (prev_state->unpack_image_height != unpack_image_height) { | |
323 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack_image_height); | |
324 } | |
325 } | |
326 if (feature_info_->IsES3Capable()) { | |
327 if (prev_state->unpack_skip_pixels != unpack_skip_pixels) { | |
328 glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpack_skip_pixels); | |
329 } | |
330 } | |
331 if (feature_info_->IsES3Capable()) { | |
332 if (prev_state->unpack_skip_rows != unpack_skip_rows) { | |
333 glPixelStorei(GL_UNPACK_SKIP_ROWS, unpack_skip_rows); | |
334 } | |
335 } | |
336 if (feature_info_->IsES3Capable()) { | |
337 if (prev_state->unpack_skip_images != unpack_skip_images) { | |
338 glPixelStorei(GL_UNPACK_SKIP_IMAGES, unpack_skip_images); | |
339 } | |
340 } | |
341 if ((polygon_offset_factor != prev_state->polygon_offset_factor) || | 293 if ((polygon_offset_factor != prev_state->polygon_offset_factor) || |
342 (polygon_offset_units != prev_state->polygon_offset_units)) | 294 (polygon_offset_units != prev_state->polygon_offset_units)) |
343 glPolygonOffset(polygon_offset_factor, polygon_offset_units); | 295 glPolygonOffset(polygon_offset_factor, polygon_offset_units); |
344 if ((sample_coverage_value != prev_state->sample_coverage_value) || | 296 if ((sample_coverage_value != prev_state->sample_coverage_value) || |
345 (sample_coverage_invert != prev_state->sample_coverage_invert)) | 297 (sample_coverage_invert != prev_state->sample_coverage_invert)) |
346 glSampleCoverage(sample_coverage_value, sample_coverage_invert); | 298 glSampleCoverage(sample_coverage_value, sample_coverage_invert); |
347 if ((scissor_x != prev_state->scissor_x) || | 299 if ((scissor_x != prev_state->scissor_x) || |
348 (scissor_y != prev_state->scissor_y) || | 300 (scissor_y != prev_state->scissor_y) || |
349 (scissor_width != prev_state->scissor_width) || | 301 (scissor_width != prev_state->scissor_width) || |
350 (scissor_height != prev_state->scissor_height)) | 302 (scissor_height != prev_state->scissor_height)) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); | 361 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); |
410 } | 362 } |
411 if (feature_info_->feature_flags().chromium_path_rendering) { | 363 if (feature_info_->feature_flags().chromium_path_rendering) { |
412 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); | 364 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); |
413 } | 365 } |
414 if (feature_info_->feature_flags().chromium_path_rendering) | 366 if (feature_info_->feature_flags().chromium_path_rendering) |
415 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, | 367 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, |
416 stencil_path_mask); | 368 stencil_path_mask); |
417 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); | 369 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); |
418 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); | 370 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); |
419 if (feature_info_->IsES3Capable()) { | |
420 glPixelStorei(GL_PACK_ROW_LENGTH, pack_row_length); | |
421 } | |
422 if (feature_info_->IsES3Capable()) { | |
423 glPixelStorei(GL_PACK_SKIP_PIXELS, pack_skip_pixels); | |
424 } | |
425 if (feature_info_->IsES3Capable()) { | |
426 glPixelStorei(GL_PACK_SKIP_ROWS, pack_skip_rows); | |
427 } | |
428 if (feature_info_->IsES3Capable()) { | |
429 glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length); | |
430 } | |
431 if (feature_info_->IsES3Capable()) { | |
432 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack_image_height); | |
433 } | |
434 if (feature_info_->IsES3Capable()) { | |
435 glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpack_skip_pixels); | |
436 } | |
437 if (feature_info_->IsES3Capable()) { | |
438 glPixelStorei(GL_UNPACK_SKIP_ROWS, unpack_skip_rows); | |
439 } | |
440 if (feature_info_->IsES3Capable()) { | |
441 glPixelStorei(GL_UNPACK_SKIP_IMAGES, unpack_skip_images); | |
442 } | |
443 glPolygonOffset(polygon_offset_factor, polygon_offset_units); | 371 glPolygonOffset(polygon_offset_factor, polygon_offset_units); |
444 glSampleCoverage(sample_coverage_value, sample_coverage_invert); | 372 glSampleCoverage(sample_coverage_value, sample_coverage_invert); |
445 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); | 373 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); |
446 glStencilFuncSeparate(GL_FRONT, stencil_front_func, stencil_front_ref, | 374 glStencilFuncSeparate(GL_FRONT, stencil_front_func, stencil_front_ref, |
447 stencil_front_mask); | 375 stencil_front_mask); |
448 glStencilFuncSeparate(GL_BACK, stencil_back_func, stencil_back_ref, | 376 glStencilFuncSeparate(GL_BACK, stencil_back_func, stencil_back_ref, |
449 stencil_back_mask); | 377 stencil_back_mask); |
450 glStencilMaskSeparate(GL_FRONT, cached_stencil_front_writemask); | 378 glStencilMaskSeparate(GL_FRONT, cached_stencil_front_writemask); |
451 glStencilMaskSeparate(GL_BACK, cached_stencil_back_writemask); | 379 glStencilMaskSeparate(GL_BACK, cached_stencil_back_writemask); |
452 glStencilOpSeparate(GL_FRONT, stencil_front_fail_op, | 380 glStencilOpSeparate(GL_FRONT, stencil_front_fail_op, |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 if (params) { | 581 if (params) { |
654 params[0] = static_cast<GLint>(pack_alignment); | 582 params[0] = static_cast<GLint>(pack_alignment); |
655 } | 583 } |
656 return true; | 584 return true; |
657 case GL_UNPACK_ALIGNMENT: | 585 case GL_UNPACK_ALIGNMENT: |
658 *num_written = 1; | 586 *num_written = 1; |
659 if (params) { | 587 if (params) { |
660 params[0] = static_cast<GLint>(unpack_alignment); | 588 params[0] = static_cast<GLint>(unpack_alignment); |
661 } | 589 } |
662 return true; | 590 return true; |
663 case GL_PACK_ROW_LENGTH: | |
664 *num_written = 1; | |
665 if (params) { | |
666 params[0] = static_cast<GLint>(pack_row_length); | |
667 } | |
668 return true; | |
669 case GL_PACK_SKIP_PIXELS: | |
670 *num_written = 1; | |
671 if (params) { | |
672 params[0] = static_cast<GLint>(pack_skip_pixels); | |
673 } | |
674 return true; | |
675 case GL_PACK_SKIP_ROWS: | |
676 *num_written = 1; | |
677 if (params) { | |
678 params[0] = static_cast<GLint>(pack_skip_rows); | |
679 } | |
680 return true; | |
681 case GL_UNPACK_ROW_LENGTH: | |
682 *num_written = 1; | |
683 if (params) { | |
684 params[0] = static_cast<GLint>(unpack_row_length); | |
685 } | |
686 return true; | |
687 case GL_UNPACK_IMAGE_HEIGHT: | |
688 *num_written = 1; | |
689 if (params) { | |
690 params[0] = static_cast<GLint>(unpack_image_height); | |
691 } | |
692 return true; | |
693 case GL_UNPACK_SKIP_PIXELS: | |
694 *num_written = 1; | |
695 if (params) { | |
696 params[0] = static_cast<GLint>(unpack_skip_pixels); | |
697 } | |
698 return true; | |
699 case GL_UNPACK_SKIP_ROWS: | |
700 *num_written = 1; | |
701 if (params) { | |
702 params[0] = static_cast<GLint>(unpack_skip_rows); | |
703 } | |
704 return true; | |
705 case GL_UNPACK_SKIP_IMAGES: | |
706 *num_written = 1; | |
707 if (params) { | |
708 params[0] = static_cast<GLint>(unpack_skip_images); | |
709 } | |
710 return true; | |
711 case GL_POLYGON_OFFSET_FACTOR: | 591 case GL_POLYGON_OFFSET_FACTOR: |
712 *num_written = 1; | 592 *num_written = 1; |
713 if (params) { | 593 if (params) { |
714 params[0] = static_cast<GLint>(round(polygon_offset_factor)); | 594 params[0] = static_cast<GLint>(round(polygon_offset_factor)); |
715 } | 595 } |
716 return true; | 596 return true; |
717 case GL_POLYGON_OFFSET_UNITS: | 597 case GL_POLYGON_OFFSET_UNITS: |
718 *num_written = 1; | 598 *num_written = 1; |
719 if (params) { | 599 if (params) { |
720 params[0] = static_cast<GLint>(round(polygon_offset_units)); | 600 params[0] = static_cast<GLint>(round(polygon_offset_units)); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 if (params) { | 949 if (params) { |
1070 params[0] = static_cast<GLfloat>(pack_alignment); | 950 params[0] = static_cast<GLfloat>(pack_alignment); |
1071 } | 951 } |
1072 return true; | 952 return true; |
1073 case GL_UNPACK_ALIGNMENT: | 953 case GL_UNPACK_ALIGNMENT: |
1074 *num_written = 1; | 954 *num_written = 1; |
1075 if (params) { | 955 if (params) { |
1076 params[0] = static_cast<GLfloat>(unpack_alignment); | 956 params[0] = static_cast<GLfloat>(unpack_alignment); |
1077 } | 957 } |
1078 return true; | 958 return true; |
1079 case GL_PACK_ROW_LENGTH: | |
1080 *num_written = 1; | |
1081 if (params) { | |
1082 params[0] = static_cast<GLfloat>(pack_row_length); | |
1083 } | |
1084 return true; | |
1085 case GL_PACK_SKIP_PIXELS: | |
1086 *num_written = 1; | |
1087 if (params) { | |
1088 params[0] = static_cast<GLfloat>(pack_skip_pixels); | |
1089 } | |
1090 return true; | |
1091 case GL_PACK_SKIP_ROWS: | |
1092 *num_written = 1; | |
1093 if (params) { | |
1094 params[0] = static_cast<GLfloat>(pack_skip_rows); | |
1095 } | |
1096 return true; | |
1097 case GL_UNPACK_ROW_LENGTH: | |
1098 *num_written = 1; | |
1099 if (params) { | |
1100 params[0] = static_cast<GLfloat>(unpack_row_length); | |
1101 } | |
1102 return true; | |
1103 case GL_UNPACK_IMAGE_HEIGHT: | |
1104 *num_written = 1; | |
1105 if (params) { | |
1106 params[0] = static_cast<GLfloat>(unpack_image_height); | |
1107 } | |
1108 return true; | |
1109 case GL_UNPACK_SKIP_PIXELS: | |
1110 *num_written = 1; | |
1111 if (params) { | |
1112 params[0] = static_cast<GLfloat>(unpack_skip_pixels); | |
1113 } | |
1114 return true; | |
1115 case GL_UNPACK_SKIP_ROWS: | |
1116 *num_written = 1; | |
1117 if (params) { | |
1118 params[0] = static_cast<GLfloat>(unpack_skip_rows); | |
1119 } | |
1120 return true; | |
1121 case GL_UNPACK_SKIP_IMAGES: | |
1122 *num_written = 1; | |
1123 if (params) { | |
1124 params[0] = static_cast<GLfloat>(unpack_skip_images); | |
1125 } | |
1126 return true; | |
1127 case GL_POLYGON_OFFSET_FACTOR: | 959 case GL_POLYGON_OFFSET_FACTOR: |
1128 *num_written = 1; | 960 *num_written = 1; |
1129 if (params) { | 961 if (params) { |
1130 params[0] = static_cast<GLfloat>(polygon_offset_factor); | 962 params[0] = static_cast<GLfloat>(polygon_offset_factor); |
1131 } | 963 } |
1132 return true; | 964 return true; |
1133 case GL_POLYGON_OFFSET_UNITS: | 965 case GL_POLYGON_OFFSET_UNITS: |
1134 *num_written = 1; | 966 *num_written = 1; |
1135 if (params) { | 967 if (params) { |
1136 params[0] = static_cast<GLfloat>(polygon_offset_units); | 968 params[0] = static_cast<GLfloat>(polygon_offset_units); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 if (params) { | 1147 if (params) { |
1316 params[0] = | 1148 params[0] = |
1317 static_cast<GLfloat>(enable_flags.primitive_restart_fixed_index); | 1149 static_cast<GLfloat>(enable_flags.primitive_restart_fixed_index); |
1318 } | 1150 } |
1319 return true; | 1151 return true; |
1320 default: | 1152 default: |
1321 return false; | 1153 return false; |
1322 } | 1154 } |
1323 } | 1155 } |
1324 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 1156 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
OLD | NEW |