| 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 8004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8015 if (!program) { | 8015 if (!program) { |
| 8016 return; | 8016 return; |
| 8017 } | 8017 } |
| 8018 | 8018 |
| 8019 LogClientServiceForInfo(program, program_id, "glLinkProgram"); | 8019 LogClientServiceForInfo(program, program_id, "glLinkProgram"); |
| 8020 if (program->Link(shader_manager(), | 8020 if (program->Link(shader_manager(), |
| 8021 workarounds().count_all_in_varyings_packing ? | 8021 workarounds().count_all_in_varyings_packing ? |
| 8022 Program::kCountAll : Program::kCountOnlyStaticallyUsed, | 8022 Program::kCountAll : Program::kCountOnlyStaticallyUsed, |
| 8023 shader_cache_callback_)) { | 8023 shader_cache_callback_)) { |
| 8024 if (program == state_.current_program.get()) { | 8024 if (program == state_.current_program.get()) { |
| 8025 if (workarounds().use_current_program_after_successful_link) | |
| 8026 glUseProgram(program->service_id()); | |
| 8027 if (workarounds().clear_uniforms_before_first_program_use) | 8025 if (workarounds().clear_uniforms_before_first_program_use) |
| 8028 program_manager()->ClearUniforms(program); | 8026 program_manager()->ClearUniforms(program); |
| 8029 } | 8027 } |
| 8030 } | 8028 } |
| 8031 | 8029 |
| 8032 // LinkProgram can be very slow. Exit command processing to allow for | 8030 // LinkProgram can be very slow. Exit command processing to allow for |
| 8033 // context preemption and GPU watchdog checks. | 8031 // context preemption and GPU watchdog checks. |
| 8034 ExitCommandProcessingEarly(); | 8032 ExitCommandProcessingEarly(); |
| 8035 } | 8033 } |
| 8036 | 8034 |
| (...skipping 9897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17934 } | 17932 } |
| 17935 | 17933 |
| 17936 // Include the auto-generated part of this file. We split this because it means | 17934 // Include the auto-generated part of this file. We split this because it means |
| 17937 // we can easily edit the non-auto generated parts right here in this file | 17935 // we can easily edit the non-auto generated parts right here in this file |
| 17938 // instead of having to edit some template or the code generator. | 17936 // instead of having to edit some template or the code generator. |
| 17939 #include "base/macros.h" | 17937 #include "base/macros.h" |
| 17940 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17938 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 17941 | 17939 |
| 17942 } // namespace gles2 | 17940 } // namespace gles2 |
| 17943 } // namespace gpu | 17941 } // namespace gpu |
| OLD | NEW |