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

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

Issue 2909683002: Track currently bound external and multisample textures. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 #include "base/strings/string_split.h" 7 #include "base/strings/string_split.h"
8 #include "gpu/command_buffer/service/feature_info.h" 8 #include "gpu/command_buffer/service/feature_info.h"
9 #include "gpu/command_buffer/service/gl_utils.h" 9 #include "gpu/command_buffer/service/gl_utils.h"
10 #include "ui/gl/gl_version_info.h" 10 #include "ui/gl/gl_version_info.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 mailbox_manager_ = group_->mailbox_manager(); 204 mailbox_manager_ = group_->mailbox_manager();
205 205
206 // Query information about the texture units 206 // Query information about the texture units
207 GLint num_texture_units = 0; 207 GLint num_texture_units = 0;
208 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units); 208 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units);
209 209
210 active_texture_unit_ = 0; 210 active_texture_unit_ = 0;
211 bound_textures_[GL_TEXTURE_2D].resize(num_texture_units, 0); 211 bound_textures_[GL_TEXTURE_2D].resize(num_texture_units, 0);
212 bound_textures_[GL_TEXTURE_CUBE_MAP].resize(num_texture_units, 0); 212 bound_textures_[GL_TEXTURE_CUBE_MAP].resize(num_texture_units, 0);
213 if (feature_info_->IsWebGL2OrES3Context()) { 213 if (feature_info_->gl_version_info().IsAtLeastGLES(3, 0)) {
Zhenyao Mo 2017/05/26 22:48:10 Are you saying we will only create ES3 ANGLE conte
Geoff Lang 2017/05/29 13:47:43 Correct, this is how ANGLE determines if it should
214 bound_textures_[GL_TEXTURE_2D_ARRAY].resize(num_texture_units, 0); 214 bound_textures_[GL_TEXTURE_2D_ARRAY].resize(num_texture_units, 0);
215 bound_textures_[GL_TEXTURE_3D].resize(num_texture_units, 0); 215 bound_textures_[GL_TEXTURE_3D].resize(num_texture_units, 0);
216 } 216 }
217 if (feature_info_->gl_version_info().IsAtLeastGLES(3, 1)) {
218 bound_textures_[GL_TEXTURE_2D_MULTISAMPLE].resize(num_texture_units, 0);
219 }
220 if (feature_info_->feature_flags().oes_egl_image_external ||
221 feature_info_->feature_flags().nv_egl_stream_consumer_external) {
222 bound_textures_[GL_TEXTURE_EXTERNAL_OES].resize(num_texture_units, 0);
223 }
217 224
218 if (group_->gpu_preferences().enable_gpu_driver_debug_logging && 225 if (group_->gpu_preferences().enable_gpu_driver_debug_logging &&
219 feature_info_->feature_flags().khr_debug) { 226 feature_info_->feature_flags().khr_debug) {
220 InitializeGLDebugLogging(); 227 InitializeGLDebugLogging();
221 } 228 }
222 229
223 set_initialized(); 230 set_initialized();
224 return true; 231 return true;
225 } 232 }
226 233
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 }, /* NOLINT */ 915 }, /* NOLINT */
909 916
910 const GLES2DecoderPassthroughImpl::CommandInfo 917 const GLES2DecoderPassthroughImpl::CommandInfo
911 GLES2DecoderPassthroughImpl::command_info[] = { 918 GLES2DecoderPassthroughImpl::command_info[] = {
912 GLES2_COMMAND_LIST(GLES2_CMD_OP)}; 919 GLES2_COMMAND_LIST(GLES2_CMD_OP)};
913 920
914 #undef GLES2_CMD_OP 921 #undef GLES2_CMD_OP
915 922
916 } // namespace gles2 923 } // namespace gles2
917 } // namespace gpu 924 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698