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

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

Issue 2503403003: ES3 sampler types and their corresponding textures should be initialized before being sampled. (Closed)
Patch Set: Created 4 years, 1 month 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/gles2_cmd_decoder.cc ('k') | no next file » | 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 struct UniformInfo { 92 struct UniformInfo {
93 UniformInfo(); 93 UniformInfo();
94 UniformInfo(const UniformInfo& other); 94 UniformInfo(const UniformInfo& other);
95 UniformInfo(const std::string& client_name, 95 UniformInfo(const std::string& client_name,
96 GLint client_location_base, 96 GLint client_location_base,
97 GLenum _type, 97 GLenum _type,
98 bool _is_array, 98 bool _is_array,
99 const std::vector<GLint>& service_locations); 99 const std::vector<GLint>& service_locations);
100 ~UniformInfo(); 100 ~UniformInfo();
101 bool IsSampler() const { 101 bool IsSampler() const {
102 return type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB || 102 switch (type) {
103 type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES; 103 case GL_SAMPLER_2D:
104 case GL_SAMPLER_2D_RECT_ARB:
105 case GL_SAMPLER_CUBE:
106 case GL_SAMPLER_EXTERNAL_OES:
107 case GL_SAMPLER_3D:
108 case GL_SAMPLER_2D_SHADOW:
109 case GL_SAMPLER_2D_ARRAY:
110 case GL_SAMPLER_2D_ARRAY_SHADOW:
111 case GL_SAMPLER_CUBE_SHADOW:
112 case GL_INT_SAMPLER_2D:
113 case GL_INT_SAMPLER_3D:
114 case GL_INT_SAMPLER_CUBE:
115 case GL_INT_SAMPLER_2D_ARRAY:
116 case GL_UNSIGNED_INT_SAMPLER_2D:
117 case GL_UNSIGNED_INT_SAMPLER_3D:
118 case GL_UNSIGNED_INT_SAMPLER_CUBE:
119 case GL_UNSIGNED_INT_SAMPLER_2D_ARRAY:
120 return true;
121 default:
122 return false;
123 }
104 } 124 }
105 125
106 GLsizei size; 126 GLsizei size;
107 GLenum type; 127 GLenum type;
108 uint32_t accepts_api_type; 128 uint32_t accepts_api_type;
109 GLint fake_location_base; 129 GLint fake_location_base;
110 bool is_array; 130 bool is_array;
111 std::string name; 131 std::string name;
112 std::vector<GLint> element_locations; 132 std::vector<GLint> element_locations;
113 std::vector<GLuint> texture_units; 133 std::vector<GLuint> texture_units;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 }; 729 };
710 730
711 inline const FeatureInfo& Program::feature_info() const { 731 inline const FeatureInfo& Program::feature_info() const {
712 return *manager_->feature_info_.get(); 732 return *manager_->feature_info_.get();
713 } 733 }
714 734
715 } // namespace gles2 735 } // namespace gles2
716 } // namespace gpu 736 } // namespace gpu
717 737
718 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 738 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698