| 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 |
| 11 // It is included by context_state.cc | 11 // It is included by context_state.cc |
| 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| 13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| 14 | 14 |
| 15 ContextState::EnableFlags::EnableFlags() | 15 ContextState::EnableFlags::EnableFlags() |
| 16 : blend(false), | 16 : blend(false), |
| 17 cached_blend(false), |
| 17 cull_face(false), | 18 cull_face(false), |
| 19 cached_cull_face(false), |
| 18 depth_test(false), | 20 depth_test(false), |
| 21 cached_depth_test(false), |
| 19 dither(true), | 22 dither(true), |
| 23 cached_dither(true), |
| 20 polygon_offset_fill(false), | 24 polygon_offset_fill(false), |
| 25 cached_polygon_offset_fill(false), |
| 21 sample_alpha_to_coverage(false), | 26 sample_alpha_to_coverage(false), |
| 27 cached_sample_alpha_to_coverage(false), |
| 22 sample_coverage(false), | 28 sample_coverage(false), |
| 29 cached_sample_coverage(false), |
| 23 scissor_test(false), | 30 scissor_test(false), |
| 24 stencil_test(false) { | 31 cached_scissor_test(false), |
| 32 stencil_test(false), |
| 33 cached_stencil_test(false) { |
| 25 } | 34 } |
| 26 | 35 |
| 27 void ContextState::Initialize() { | 36 void ContextState::Initialize() { |
| 28 blend_color_red = 0.0f; | 37 blend_color_red = 0.0f; |
| 29 blend_color_green = 0.0f; | 38 blend_color_green = 0.0f; |
| 30 blend_color_blue = 0.0f; | 39 blend_color_blue = 0.0f; |
| 31 blend_color_alpha = 0.0f; | 40 blend_color_alpha = 0.0f; |
| 32 blend_equation_rgb = GL_FUNC_ADD; | 41 blend_equation_rgb = GL_FUNC_ADD; |
| 33 blend_equation_alpha = GL_FUNC_ADD; | 42 blend_equation_alpha = GL_FUNC_ADD; |
| 34 blend_source_rgb = GL_ONE; | 43 blend_source_rgb = GL_ONE; |
| 35 blend_dest_rgb = GL_ZERO; | 44 blend_dest_rgb = GL_ZERO; |
| 36 blend_source_alpha = GL_ONE; | 45 blend_source_alpha = GL_ONE; |
| 37 blend_dest_alpha = GL_ZERO; | 46 blend_dest_alpha = GL_ZERO; |
| 38 color_clear_red = 0.0f; | 47 color_clear_red = 0.0f; |
| 39 color_clear_green = 0.0f; | 48 color_clear_green = 0.0f; |
| 40 color_clear_blue = 0.0f; | 49 color_clear_blue = 0.0f; |
| 41 color_clear_alpha = 0.0f; | 50 color_clear_alpha = 0.0f; |
| 42 depth_clear = 1.0f; | 51 depth_clear = 1.0f; |
| 43 stencil_clear = 0; | 52 stencil_clear = 0; |
| 44 color_mask_red = true; | 53 color_mask_red = true; |
| 54 cached_color_mask_red = true; |
| 45 color_mask_green = true; | 55 color_mask_green = true; |
| 56 cached_color_mask_green = true; |
| 46 color_mask_blue = true; | 57 color_mask_blue = true; |
| 58 cached_color_mask_blue = true; |
| 47 color_mask_alpha = true; | 59 color_mask_alpha = true; |
| 60 cached_color_mask_alpha = true; |
| 48 cull_mode = GL_BACK; | 61 cull_mode = GL_BACK; |
| 49 depth_func = GL_LESS; | 62 depth_func = GL_LESS; |
| 50 depth_mask = true; | 63 depth_mask = true; |
| 64 cached_depth_mask = true; |
| 51 z_near = 0.0f; | 65 z_near = 0.0f; |
| 52 z_far = 1.0f; | 66 z_far = 1.0f; |
| 53 front_face = GL_CCW; | 67 front_face = GL_CCW; |
| 54 hint_generate_mipmap = GL_DONT_CARE; | 68 hint_generate_mipmap = GL_DONT_CARE; |
| 55 hint_fragment_shader_derivative = GL_DONT_CARE; | 69 hint_fragment_shader_derivative = GL_DONT_CARE; |
| 56 line_width = 1.0f; | 70 line_width = 1.0f; |
| 57 pack_alignment = 4; | 71 pack_alignment = 4; |
| 58 unpack_alignment = 4; | 72 unpack_alignment = 4; |
| 59 polygon_offset_factor = 0.0f; | 73 polygon_offset_factor = 0.0f; |
| 60 polygon_offset_units = 0.0f; | 74 polygon_offset_units = 0.0f; |
| 61 sample_coverage_value = 1.0f; | 75 sample_coverage_value = 1.0f; |
| 62 sample_coverage_invert = false; | 76 sample_coverage_invert = false; |
| 63 scissor_x = 0; | 77 scissor_x = 0; |
| 64 scissor_y = 0; | 78 scissor_y = 0; |
| 65 scissor_width = 1; | 79 scissor_width = 1; |
| 66 scissor_height = 1; | 80 scissor_height = 1; |
| 67 stencil_front_func = GL_ALWAYS; | 81 stencil_front_func = GL_ALWAYS; |
| 68 stencil_front_ref = 0; | 82 stencil_front_ref = 0; |
| 69 stencil_front_mask = 0xFFFFFFFFU; | 83 stencil_front_mask = 0xFFFFFFFFU; |
| 70 stencil_back_func = GL_ALWAYS; | 84 stencil_back_func = GL_ALWAYS; |
| 71 stencil_back_ref = 0; | 85 stencil_back_ref = 0; |
| 72 stencil_back_mask = 0xFFFFFFFFU; | 86 stencil_back_mask = 0xFFFFFFFFU; |
| 73 stencil_front_writemask = 0xFFFFFFFFU; | 87 stencil_front_writemask = 0xFFFFFFFFU; |
| 88 cached_stencil_front_writemask = 0xFFFFFFFFU; |
| 74 stencil_back_writemask = 0xFFFFFFFFU; | 89 stencil_back_writemask = 0xFFFFFFFFU; |
| 90 cached_stencil_back_writemask = 0xFFFFFFFFU; |
| 75 stencil_front_fail_op = GL_KEEP; | 91 stencil_front_fail_op = GL_KEEP; |
| 76 stencil_front_z_fail_op = GL_KEEP; | 92 stencil_front_z_fail_op = GL_KEEP; |
| 77 stencil_front_z_pass_op = GL_KEEP; | 93 stencil_front_z_pass_op = GL_KEEP; |
| 78 stencil_back_fail_op = GL_KEEP; | 94 stencil_back_fail_op = GL_KEEP; |
| 79 stencil_back_z_fail_op = GL_KEEP; | 95 stencil_back_z_fail_op = GL_KEEP; |
| 80 stencil_back_z_pass_op = GL_KEEP; | 96 stencil_back_z_pass_op = GL_KEEP; |
| 81 viewport_x = 0; | 97 viewport_x = 0; |
| 82 viewport_y = 0; | 98 viewport_y = 0; |
| 83 viewport_width = 1; | 99 viewport_width = 1; |
| 84 viewport_height = 1; | 100 viewport_height = 1; |
| 85 } | 101 } |
| 86 | 102 |
| 87 void ContextState::InitCapabilities(const ContextState* prev_state) const { | 103 void ContextState::InitCapabilities(const ContextState* prev_state) const { |
| 88 if (prev_state) { | 104 if (prev_state) { |
| 89 if (prev_state->enable_flags.blend != enable_flags.blend) | 105 if (prev_state->enable_flags.cached_blend != enable_flags.cached_blend) |
| 90 EnableDisable(GL_BLEND, enable_flags.blend); | 106 EnableDisable(GL_BLEND, enable_flags.cached_blend); |
| 91 if (prev_state->enable_flags.cull_face != enable_flags.cull_face) | 107 if (prev_state->enable_flags.cached_cull_face != |
| 92 EnableDisable(GL_CULL_FACE, enable_flags.cull_face); | 108 enable_flags.cached_cull_face) |
| 93 if (prev_state->enable_flags.depth_test != enable_flags.depth_test) | 109 EnableDisable(GL_CULL_FACE, enable_flags.cached_cull_face); |
| 94 EnableDisable(GL_DEPTH_TEST, enable_flags.depth_test); | 110 if (prev_state->enable_flags.cached_depth_test != |
| 95 if (prev_state->enable_flags.dither != enable_flags.dither) | 111 enable_flags.cached_depth_test) |
| 96 EnableDisable(GL_DITHER, enable_flags.dither); | 112 EnableDisable(GL_DEPTH_TEST, enable_flags.cached_depth_test); |
| 97 if (prev_state->enable_flags.polygon_offset_fill != | 113 if (prev_state->enable_flags.cached_dither != enable_flags.cached_dither) |
| 98 enable_flags.polygon_offset_fill) | 114 EnableDisable(GL_DITHER, enable_flags.cached_dither); |
| 99 EnableDisable(GL_POLYGON_OFFSET_FILL, enable_flags.polygon_offset_fill); | 115 if (prev_state->enable_flags.cached_polygon_offset_fill != |
| 100 if (prev_state->enable_flags.sample_alpha_to_coverage != | 116 enable_flags.cached_polygon_offset_fill) |
| 101 enable_flags.sample_alpha_to_coverage) | 117 EnableDisable(GL_POLYGON_OFFSET_FILL, |
| 118 enable_flags.cached_polygon_offset_fill); |
| 119 if (prev_state->enable_flags.cached_sample_alpha_to_coverage != |
| 120 enable_flags.cached_sample_alpha_to_coverage) |
| 102 EnableDisable(GL_SAMPLE_ALPHA_TO_COVERAGE, | 121 EnableDisable(GL_SAMPLE_ALPHA_TO_COVERAGE, |
| 103 enable_flags.sample_alpha_to_coverage); | 122 enable_flags.cached_sample_alpha_to_coverage); |
| 104 if (prev_state->enable_flags.sample_coverage != | 123 if (prev_state->enable_flags.cached_sample_coverage != |
| 105 enable_flags.sample_coverage) | 124 enable_flags.cached_sample_coverage) |
| 106 EnableDisable(GL_SAMPLE_COVERAGE, enable_flags.sample_coverage); | 125 EnableDisable(GL_SAMPLE_COVERAGE, enable_flags.cached_sample_coverage); |
| 107 if (prev_state->enable_flags.scissor_test != enable_flags.scissor_test) | 126 if (prev_state->enable_flags.cached_scissor_test != |
| 108 EnableDisable(GL_SCISSOR_TEST, enable_flags.scissor_test); | 127 enable_flags.cached_scissor_test) |
| 109 if (prev_state->enable_flags.stencil_test != enable_flags.stencil_test) | 128 EnableDisable(GL_SCISSOR_TEST, enable_flags.cached_scissor_test); |
| 110 EnableDisable(GL_STENCIL_TEST, enable_flags.stencil_test); | 129 if (prev_state->enable_flags.cached_stencil_test != |
| 130 enable_flags.cached_stencil_test) |
| 131 EnableDisable(GL_STENCIL_TEST, enable_flags.cached_stencil_test); |
| 111 } else { | 132 } else { |
| 112 EnableDisable(GL_BLEND, enable_flags.blend); | 133 EnableDisable(GL_BLEND, enable_flags.cached_blend); |
| 113 EnableDisable(GL_CULL_FACE, enable_flags.cull_face); | 134 EnableDisable(GL_CULL_FACE, enable_flags.cached_cull_face); |
| 114 EnableDisable(GL_DEPTH_TEST, enable_flags.depth_test); | 135 EnableDisable(GL_DEPTH_TEST, enable_flags.cached_depth_test); |
| 115 EnableDisable(GL_DITHER, enable_flags.dither); | 136 EnableDisable(GL_DITHER, enable_flags.cached_dither); |
| 116 EnableDisable(GL_POLYGON_OFFSET_FILL, enable_flags.polygon_offset_fill); | 137 EnableDisable(GL_POLYGON_OFFSET_FILL, |
| 138 enable_flags.cached_polygon_offset_fill); |
| 117 EnableDisable(GL_SAMPLE_ALPHA_TO_COVERAGE, | 139 EnableDisable(GL_SAMPLE_ALPHA_TO_COVERAGE, |
| 118 enable_flags.sample_alpha_to_coverage); | 140 enable_flags.cached_sample_alpha_to_coverage); |
| 119 EnableDisable(GL_SAMPLE_COVERAGE, enable_flags.sample_coverage); | 141 EnableDisable(GL_SAMPLE_COVERAGE, enable_flags.cached_sample_coverage); |
| 120 EnableDisable(GL_SCISSOR_TEST, enable_flags.scissor_test); | 142 EnableDisable(GL_SCISSOR_TEST, enable_flags.cached_scissor_test); |
| 121 EnableDisable(GL_STENCIL_TEST, enable_flags.stencil_test); | 143 EnableDisable(GL_STENCIL_TEST, enable_flags.cached_stencil_test); |
| 122 } | 144 } |
| 123 } | 145 } |
| 124 | 146 |
| 125 void ContextState::InitState(const ContextState* prev_state) const { | 147 void ContextState::InitState(const ContextState* prev_state) const { |
| 126 if (prev_state) { | 148 if (prev_state) { |
| 127 if ((blend_color_red != prev_state->blend_color_red) || | 149 if ((blend_color_red != prev_state->blend_color_red) || |
| 128 (blend_color_green != prev_state->blend_color_green) || | 150 (blend_color_green != prev_state->blend_color_green) || |
| 129 (blend_color_blue != prev_state->blend_color_blue) || | 151 (blend_color_blue != prev_state->blend_color_blue) || |
| 130 (blend_color_alpha != prev_state->blend_color_alpha)) | 152 (blend_color_alpha != prev_state->blend_color_alpha)) |
| 131 glBlendColor(blend_color_red, | 153 glBlendColor(blend_color_red, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 148 (color_clear_blue != prev_state->color_clear_blue) || | 170 (color_clear_blue != prev_state->color_clear_blue) || |
| 149 (color_clear_alpha != prev_state->color_clear_alpha)) | 171 (color_clear_alpha != prev_state->color_clear_alpha)) |
| 150 glClearColor(color_clear_red, | 172 glClearColor(color_clear_red, |
| 151 color_clear_green, | 173 color_clear_green, |
| 152 color_clear_blue, | 174 color_clear_blue, |
| 153 color_clear_alpha); | 175 color_clear_alpha); |
| 154 if ((depth_clear != prev_state->depth_clear)) | 176 if ((depth_clear != prev_state->depth_clear)) |
| 155 glClearDepth(depth_clear); | 177 glClearDepth(depth_clear); |
| 156 if ((stencil_clear != prev_state->stencil_clear)) | 178 if ((stencil_clear != prev_state->stencil_clear)) |
| 157 glClearStencil(stencil_clear); | 179 glClearStencil(stencil_clear); |
| 158 if ((color_mask_red != prev_state->color_mask_red) || | 180 if ((cached_color_mask_red != prev_state->cached_color_mask_red) || |
| 159 (color_mask_green != prev_state->color_mask_green) || | 181 (cached_color_mask_green != prev_state->cached_color_mask_green) || |
| 160 (color_mask_blue != prev_state->color_mask_blue) || | 182 (cached_color_mask_blue != prev_state->cached_color_mask_blue) || |
| 161 (color_mask_alpha != prev_state->color_mask_alpha)) | 183 (cached_color_mask_alpha != prev_state->cached_color_mask_alpha)) |
| 162 glColorMask( | 184 glColorMask(cached_color_mask_red, |
| 163 color_mask_red, color_mask_green, color_mask_blue, color_mask_alpha); | 185 cached_color_mask_green, |
| 186 cached_color_mask_blue, |
| 187 cached_color_mask_alpha); |
| 164 if ((cull_mode != prev_state->cull_mode)) | 188 if ((cull_mode != prev_state->cull_mode)) |
| 165 glCullFace(cull_mode); | 189 glCullFace(cull_mode); |
| 166 if ((depth_func != prev_state->depth_func)) | 190 if ((depth_func != prev_state->depth_func)) |
| 167 glDepthFunc(depth_func); | 191 glDepthFunc(depth_func); |
| 168 if ((depth_mask != prev_state->depth_mask)) | 192 if ((cached_depth_mask != prev_state->cached_depth_mask)) |
| 169 glDepthMask(depth_mask); | 193 glDepthMask(cached_depth_mask); |
| 170 if ((z_near != prev_state->z_near) || (z_far != prev_state->z_far)) | 194 if ((z_near != prev_state->z_near) || (z_far != prev_state->z_far)) |
| 171 glDepthRange(z_near, z_far); | 195 glDepthRange(z_near, z_far); |
| 172 if ((front_face != prev_state->front_face)) | 196 if ((front_face != prev_state->front_face)) |
| 173 glFrontFace(front_face); | 197 glFrontFace(front_face); |
| 174 if (prev_state->hint_generate_mipmap != hint_generate_mipmap) | 198 if (prev_state->hint_generate_mipmap != hint_generate_mipmap) |
| 175 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); | 199 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); |
| 176 if (feature_info_->feature_flags().oes_standard_derivatives) | 200 if (feature_info_->feature_flags().oes_standard_derivatives) |
| 177 if (prev_state->hint_fragment_shader_derivative != | 201 if (prev_state->hint_fragment_shader_derivative != |
| 178 hint_fragment_shader_derivative) | 202 hint_fragment_shader_derivative) |
| 179 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, | 203 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 198 if ((stencil_front_func != prev_state->stencil_front_func) || | 222 if ((stencil_front_func != prev_state->stencil_front_func) || |
| 199 (stencil_front_ref != prev_state->stencil_front_ref) || | 223 (stencil_front_ref != prev_state->stencil_front_ref) || |
| 200 (stencil_front_mask != prev_state->stencil_front_mask)) | 224 (stencil_front_mask != prev_state->stencil_front_mask)) |
| 201 glStencilFuncSeparate( | 225 glStencilFuncSeparate( |
| 202 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); | 226 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); |
| 203 if ((stencil_back_func != prev_state->stencil_back_func) || | 227 if ((stencil_back_func != prev_state->stencil_back_func) || |
| 204 (stencil_back_ref != prev_state->stencil_back_ref) || | 228 (stencil_back_ref != prev_state->stencil_back_ref) || |
| 205 (stencil_back_mask != prev_state->stencil_back_mask)) | 229 (stencil_back_mask != prev_state->stencil_back_mask)) |
| 206 glStencilFuncSeparate( | 230 glStencilFuncSeparate( |
| 207 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); | 231 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); |
| 208 if ((stencil_front_writemask != prev_state->stencil_front_writemask)) | 232 if ((cached_stencil_front_writemask != |
| 209 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); | 233 prev_state->cached_stencil_front_writemask)) |
| 210 if ((stencil_back_writemask != prev_state->stencil_back_writemask)) | 234 glStencilMaskSeparate(GL_FRONT, cached_stencil_front_writemask); |
| 211 glStencilMaskSeparate(GL_BACK, stencil_back_writemask); | 235 if ((cached_stencil_back_writemask != |
| 236 prev_state->cached_stencil_back_writemask)) |
| 237 glStencilMaskSeparate(GL_BACK, cached_stencil_back_writemask); |
| 212 if ((stencil_front_fail_op != prev_state->stencil_front_fail_op) || | 238 if ((stencil_front_fail_op != prev_state->stencil_front_fail_op) || |
| 213 (stencil_front_z_fail_op != prev_state->stencil_front_z_fail_op) || | 239 (stencil_front_z_fail_op != prev_state->stencil_front_z_fail_op) || |
| 214 (stencil_front_z_pass_op != prev_state->stencil_front_z_pass_op)) | 240 (stencil_front_z_pass_op != prev_state->stencil_front_z_pass_op)) |
| 215 glStencilOpSeparate(GL_FRONT, | 241 glStencilOpSeparate(GL_FRONT, |
| 216 stencil_front_fail_op, | 242 stencil_front_fail_op, |
| 217 stencil_front_z_fail_op, | 243 stencil_front_z_fail_op, |
| 218 stencil_front_z_pass_op); | 244 stencil_front_z_pass_op); |
| 219 if ((stencil_back_fail_op != prev_state->stencil_back_fail_op) || | 245 if ((stencil_back_fail_op != prev_state->stencil_back_fail_op) || |
| 220 (stencil_back_z_fail_op != prev_state->stencil_back_z_fail_op) || | 246 (stencil_back_z_fail_op != prev_state->stencil_back_z_fail_op) || |
| 221 (stencil_back_z_pass_op != prev_state->stencil_back_z_pass_op)) | 247 (stencil_back_z_pass_op != prev_state->stencil_back_z_pass_op)) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 235 blend_color_alpha); | 261 blend_color_alpha); |
| 236 glBlendEquationSeparate(blend_equation_rgb, blend_equation_alpha); | 262 glBlendEquationSeparate(blend_equation_rgb, blend_equation_alpha); |
| 237 glBlendFuncSeparate( | 263 glBlendFuncSeparate( |
| 238 blend_source_rgb, blend_dest_rgb, blend_source_alpha, blend_dest_alpha); | 264 blend_source_rgb, blend_dest_rgb, blend_source_alpha, blend_dest_alpha); |
| 239 glClearColor(color_clear_red, | 265 glClearColor(color_clear_red, |
| 240 color_clear_green, | 266 color_clear_green, |
| 241 color_clear_blue, | 267 color_clear_blue, |
| 242 color_clear_alpha); | 268 color_clear_alpha); |
| 243 glClearDepth(depth_clear); | 269 glClearDepth(depth_clear); |
| 244 glClearStencil(stencil_clear); | 270 glClearStencil(stencil_clear); |
| 245 glColorMask( | 271 glColorMask(cached_color_mask_red, |
| 246 color_mask_red, color_mask_green, color_mask_blue, color_mask_alpha); | 272 cached_color_mask_green, |
| 273 cached_color_mask_blue, |
| 274 cached_color_mask_alpha); |
| 247 glCullFace(cull_mode); | 275 glCullFace(cull_mode); |
| 248 glDepthFunc(depth_func); | 276 glDepthFunc(depth_func); |
| 249 glDepthMask(depth_mask); | 277 glDepthMask(cached_depth_mask); |
| 250 glDepthRange(z_near, z_far); | 278 glDepthRange(z_near, z_far); |
| 251 glFrontFace(front_face); | 279 glFrontFace(front_face); |
| 252 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); | 280 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); |
| 253 if (feature_info_->feature_flags().oes_standard_derivatives) | 281 if (feature_info_->feature_flags().oes_standard_derivatives) |
| 254 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, | 282 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, |
| 255 hint_fragment_shader_derivative); | 283 hint_fragment_shader_derivative); |
| 256 glLineWidth(line_width); | 284 glLineWidth(line_width); |
| 257 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); | 285 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); |
| 258 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); | 286 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); |
| 259 glPolygonOffset(polygon_offset_factor, polygon_offset_units); | 287 glPolygonOffset(polygon_offset_factor, polygon_offset_units); |
| 260 glSampleCoverage(sample_coverage_value, sample_coverage_invert); | 288 glSampleCoverage(sample_coverage_value, sample_coverage_invert); |
| 261 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); | 289 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); |
| 262 glStencilFuncSeparate( | 290 glStencilFuncSeparate( |
| 263 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); | 291 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); |
| 264 glStencilFuncSeparate( | 292 glStencilFuncSeparate( |
| 265 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); | 293 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); |
| 266 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); | 294 glStencilMaskSeparate(GL_FRONT, cached_stencil_front_writemask); |
| 267 glStencilMaskSeparate(GL_BACK, stencil_back_writemask); | 295 glStencilMaskSeparate(GL_BACK, cached_stencil_back_writemask); |
| 268 glStencilOpSeparate(GL_FRONT, | 296 glStencilOpSeparate(GL_FRONT, |
| 269 stencil_front_fail_op, | 297 stencil_front_fail_op, |
| 270 stencil_front_z_fail_op, | 298 stencil_front_z_fail_op, |
| 271 stencil_front_z_pass_op); | 299 stencil_front_z_pass_op); |
| 272 glStencilOpSeparate(GL_BACK, | 300 glStencilOpSeparate(GL_BACK, |
| 273 stencil_back_fail_op, | 301 stencil_back_fail_op, |
| 274 stencil_back_z_fail_op, | 302 stencil_back_z_fail_op, |
| 275 stencil_back_z_pass_op); | 303 stencil_back_z_pass_op); |
| 276 glViewport(viewport_x, viewport_y, viewport_width, viewport_height); | 304 glViewport(viewport_x, viewport_y, viewport_width, viewport_height); |
| 277 } | 305 } |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 *num_written = 1; | 973 *num_written = 1; |
| 946 if (params) { | 974 if (params) { |
| 947 params[0] = static_cast<GLfloat>(enable_flags.stencil_test); | 975 params[0] = static_cast<GLfloat>(enable_flags.stencil_test); |
| 948 } | 976 } |
| 949 return true; | 977 return true; |
| 950 default: | 978 default: |
| 951 return false; | 979 return false; |
| 952 } | 980 } |
| 953 } | 981 } |
| 954 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 982 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| OLD | NEW |