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 8014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8025 if (!program) { | 8025 if (!program) { |
8026 return; | 8026 return; |
8027 } | 8027 } |
8028 | 8028 |
8029 LogClientServiceForInfo(program, program_id, "glLinkProgram"); | 8029 LogClientServiceForInfo(program, program_id, "glLinkProgram"); |
8030 if (program->Link(shader_manager(), | 8030 if (program->Link(shader_manager(), |
8031 workarounds().count_all_in_varyings_packing ? | 8031 workarounds().count_all_in_varyings_packing ? |
8032 Program::kCountAll : Program::kCountOnlyStaticallyUsed, | 8032 Program::kCountAll : Program::kCountOnlyStaticallyUsed, |
8033 shader_cache_callback_)) { | 8033 shader_cache_callback_)) { |
8034 if (program == state_.current_program.get()) { | 8034 if (program == state_.current_program.get()) { |
8035 if (workarounds().use_current_program_after_successful_link) | |
8036 glUseProgram(program->service_id()); | |
8037 if (workarounds().clear_uniforms_before_first_program_use) | 8035 if (workarounds().clear_uniforms_before_first_program_use) |
8038 program_manager()->ClearUniforms(program); | 8036 program_manager()->ClearUniforms(program); |
8039 } | 8037 } |
8040 } | 8038 } |
8041 | 8039 |
8042 // LinkProgram can be very slow. Exit command processing to allow for | 8040 // LinkProgram can be very slow. Exit command processing to allow for |
8043 // context preemption and GPU watchdog checks. | 8041 // context preemption and GPU watchdog checks. |
8044 ExitCommandProcessingEarly(); | 8042 ExitCommandProcessingEarly(); |
8045 } | 8043 } |
8046 | 8044 |
(...skipping 9928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17975 } | 17973 } |
17976 | 17974 |
17977 // Include the auto-generated part of this file. We split this because it means | 17975 // Include the auto-generated part of this file. We split this because it means |
17978 // we can easily edit the non-auto generated parts right here in this file | 17976 // we can easily edit the non-auto generated parts right here in this file |
17979 // instead of having to edit some template or the code generator. | 17977 // instead of having to edit some template or the code generator. |
17980 #include "base/macros.h" | 17978 #include "base/macros.h" |
17981 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17979 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
17982 | 17980 |
17983 } // namespace gles2 | 17981 } // namespace gles2 |
17984 } // namespace gpu | 17982 } // namespace gpu |
OLD | NEW |