| OLD | NEW |
| 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3721 if (workarounds().unfold_short_circuit_as_ternary_operation) | 3721 if (workarounds().unfold_short_circuit_as_ternary_operation) |
| 3722 driver_bug_workarounds |= SH_UNFOLD_SHORT_CIRCUIT; | 3722 driver_bug_workarounds |= SH_UNFOLD_SHORT_CIRCUIT; |
| 3723 if (workarounds().scalarize_vec_and_mat_constructor_args) | 3723 if (workarounds().scalarize_vec_and_mat_constructor_args) |
| 3724 driver_bug_workarounds |= SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS; | 3724 driver_bug_workarounds |= SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS; |
| 3725 if (workarounds().regenerate_struct_names) | 3725 if (workarounds().regenerate_struct_names) |
| 3726 driver_bug_workarounds |= SH_REGENERATE_STRUCT_NAMES; | 3726 driver_bug_workarounds |= SH_REGENERATE_STRUCT_NAMES; |
| 3727 if (workarounds().remove_pow_with_constant_exponent) | 3727 if (workarounds().remove_pow_with_constant_exponent) |
| 3728 driver_bug_workarounds |= SH_REMOVE_POW_WITH_CONSTANT_EXPONENT; | 3728 driver_bug_workarounds |= SH_REMOVE_POW_WITH_CONSTANT_EXPONENT; |
| 3729 if (workarounds().emulate_abs_int_function) | 3729 if (workarounds().emulate_abs_int_function) |
| 3730 driver_bug_workarounds |= SH_EMULATE_ABS_INT_FUNCTION; | 3730 driver_bug_workarounds |= SH_EMULATE_ABS_INT_FUNCTION; |
| 3731 if (workarounds().rewrite_texelfetchoffset_to_texelfetch) |
| 3732 driver_bug_workarounds |= SH_REWRITE_TEXELFETCHOFFSET_TO_TEXELFETCH; |
| 3731 | 3733 |
| 3732 resources.WEBGL_debug_shader_precision = | 3734 resources.WEBGL_debug_shader_precision = |
| 3733 group_->gpu_preferences().emulate_shader_precision; | 3735 group_->gpu_preferences().emulate_shader_precision; |
| 3734 | 3736 |
| 3735 ShShaderOutput shader_output_language = | 3737 ShShaderOutput shader_output_language = |
| 3736 ShaderTranslator::GetShaderOutputLanguageForContext(gl_version_info()); | 3738 ShaderTranslator::GetShaderOutputLanguageForContext(gl_version_info()); |
| 3737 | 3739 |
| 3738 vertex_translator_ = shader_translator_cache()->GetTranslator( | 3740 vertex_translator_ = shader_translator_cache()->GetTranslator( |
| 3739 GL_VERTEX_SHADER, shader_spec, &resources, shader_output_language, | 3741 GL_VERTEX_SHADER, shader_spec, &resources, shader_output_language, |
| 3740 static_cast<ShCompileOptions>(driver_bug_workarounds)); | 3742 static_cast<ShCompileOptions>(driver_bug_workarounds)); |
| (...skipping 14007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17748 } | 17750 } |
| 17749 | 17751 |
| 17750 // Include the auto-generated part of this file. We split this because it means | 17752 // Include the auto-generated part of this file. We split this because it means |
| 17751 // we can easily edit the non-auto generated parts right here in this file | 17753 // we can easily edit the non-auto generated parts right here in this file |
| 17752 // instead of having to edit some template or the code generator. | 17754 // instead of having to edit some template or the code generator. |
| 17753 #include "base/macros.h" | 17755 #include "base/macros.h" |
| 17754 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17756 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 17755 | 17757 |
| 17756 } // namespace gles2 | 17758 } // namespace gles2 |
| 17757 } // namespace gpu | 17759 } // namespace gpu |
| OLD | NEW |