Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: gpu/command_buffer/service/program_manager.cc

Issue 2098913002: GLVersionInfo: alse detect es3 support with extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix references to IsES3Capable Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 size_t client_location = client_location_indices[i]; 823 size_t client_location = client_location_indices[i];
824 // Before linking, we already validated that no two statically used fragment 824 // Before linking, we already validated that no two statically used fragment
825 // inputs are bound to the same location. 825 // inputs are bound to the same location.
826 DCHECK(!fragment_input_locations_[client_location].IsActive()); 826 DCHECK(!fragment_input_locations_[client_location].IsActive());
827 fragment_input_locations_[client_location].SetActive( 827 fragment_input_locations_[client_location].SetActive(
828 &fragment_input_infos_[i]); 828 &fragment_input_infos_[i]);
829 } 829 }
830 } 830 }
831 831
832 void Program::UpdateProgramOutputs() { 832 void Program::UpdateProgramOutputs() {
833 if (!feature_info().gl_version_info().IsES3Capable() || 833 if (!feature_info().gl_version_info().is_es3_capable ||
834 feature_info().disable_shader_translator()) 834 feature_info().disable_shader_translator())
835 return; 835 return;
836 836
837 Shader* fragment_shader = 837 Shader* fragment_shader =
838 attached_shaders_[ShaderTypeToIndex(GL_FRAGMENT_SHADER)].get(); 838 attached_shaders_[ShaderTypeToIndex(GL_FRAGMENT_SHADER)].get();
839 839
840 for (auto const& output_var : fragment_shader->output_variable_list()) { 840 for (auto const& output_var : fragment_shader->output_variable_list()) {
841 const std::string& service_name = output_var.mappedName; 841 const std::string& service_name = output_var.mappedName;
842 // A fragment shader can have gl_FragColor, gl_SecondaryFragColor, etc 842 // A fragment shader can have gl_FragColor, gl_SecondaryFragColor, etc
843 // built-ins as its output, as well as custom varyings. We are interested 843 // built-ins as its output, as well as custom varyings. We are interested
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 DCHECK(program); 2367 DCHECK(program);
2368 program->ClearUniforms(&zero_); 2368 program->ClearUniforms(&zero_);
2369 } 2369 }
2370 2370
2371 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { 2371 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) {
2372 return index + element * 0x10000; 2372 return index + element * 0x10000;
2373 } 2373 }
2374 2374
2375 } // namespace gles2 2375 } // namespace gles2
2376 } // namespace gpu 2376 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698